wtf: No longer use vendored dependencies
The go modules utilized by the project and the vendored dependencies already diverged, so the nix build of `wtf` was slightly out-of-date regarding the official binary. The gocenter proxy provides "immutable re-usable Go modules" which should avoid the problem of any dependency suddenly vanishing.
This commit is contained in:
parent
57b66eb3f2
commit
7ee4516a7e
@ -9,6 +9,10 @@ buildGoModule rec {
|
|||||||
pname = "wtf";
|
pname = "wtf";
|
||||||
version = "0.21.0";
|
version = "0.21.0";
|
||||||
|
|
||||||
|
overrideModAttrs = _oldAttrs : _oldAttrs // {
|
||||||
|
preBuild = ''export GOPROXY="https://gocenter.io"'';
|
||||||
|
};
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "wtfutil";
|
owner = "wtfutil";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
@ -16,21 +20,12 @@ buildGoModule rec {
|
|||||||
sha256 = "0sd8vrx7nak0by4whdmd9jzr66zm48knv1w1aqi90709fv98brm9";
|
sha256 = "0sd8vrx7nak0by4whdmd9jzr66zm48knv1w1aqi90709fv98brm9";
|
||||||
};
|
};
|
||||||
|
|
||||||
modSha256 = "1nqnjpkrjbb75yfbzh3v3vc4xy5a2aqm9jr40hwq589a4l9p5pw2";
|
modSha256 = "0jgq9ql27x0kdp59l5drisl5v7v7sx2wy3zqjbr3bqyh3vdx19ic";
|
||||||
|
|
||||||
buildFlagsArray = [ "-ldflags=-s -w -X main.version=${version}" ];
|
buildFlagsArray = [ "-ldflags=-s -w -X main.version=${version}" ];
|
||||||
|
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
|
|
||||||
# As per https://github.com/wtfutil/wtf/issues/501, one of the
|
|
||||||
# dependencies can't be fetched, so vendored dependencies should
|
|
||||||
# be used instead
|
|
||||||
modBuildPhase = ''
|
|
||||||
runHook preBuild
|
|
||||||
make build -mod=vendor
|
|
||||||
runHook postBuild
|
|
||||||
'';
|
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
wrapProgram "$out/bin/wtf" --prefix PATH : "${ncurses.dev}/bin"
|
wrapProgram "$out/bin/wtf" --prefix PATH : "${ncurses.dev}/bin"
|
||||||
'';
|
'';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user