12
default.nix
12
default.nix
@@ -1,12 +0,0 @@
|
|||||||
{ pkgs }:
|
|
||||||
|
|
||||||
pkgs.buildGoModule rec {
|
|
||||||
pname = "sox";
|
|
||||||
version = "0.0.1";
|
|
||||||
|
|
||||||
src = ./.;
|
|
||||||
|
|
||||||
vendorHash = null;
|
|
||||||
|
|
||||||
ldflags = [ "-s" "-w" "-X=main.Version=${version}" ];
|
|
||||||
}
|
|
||||||
27
package.nix
27
package.nix
@@ -1,25 +1,12 @@
|
|||||||
{ lib
|
{ pkgs }:
|
||||||
, buildGoModule
|
|
||||||
, fetchFromGitHub
|
pkgs.buildGoModule rec {
|
||||||
,
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
sox = buildGoModule {
|
|
||||||
pname = "sox";
|
pname = "sox";
|
||||||
# In 'nix develop', we don't need a copy of the source tree
|
version = "0.0.1";
|
||||||
# in the Nix store.
|
|
||||||
src = ./.;
|
src = ./.;
|
||||||
|
|
||||||
# This hash locks the dependencies of this package. It is
|
vendorHash = "sha256-TK2Fc4bTkiSpyYrg4dJOzamEnii03P7kyHZdah9izqY=";
|
||||||
# necessary because of how Go requires network access to resolve
|
|
||||||
# VCS. See https://www.tweag.io/blog/2021-03-04-gomod2nix/ for
|
|
||||||
# details. Normally one can build with a fake hash and rely on native Go
|
|
||||||
# mechanisms to tell you what the hash should be or determine what
|
|
||||||
# it should be "out-of-band" with other tooling (eg. gomod2nix).
|
|
||||||
# To begin with it is recommended to set this, but one must
|
|
||||||
# remember to bump this hash when your dependencies change.
|
|
||||||
# vendorHash = pkgs.lib.fakeHash;
|
|
||||||
|
|
||||||
vendorHash = null;
|
ldflags = [ "-s" "-w" "-X=main.Version=${version}" ];
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user