revive: ensure go is on the PATH at runtime
This is needed due to https://github.com/mgechev/revive/pull/993.
This commit is contained in:
parent
849492e6e2
commit
38cfa2e7cc
@ -1,4 +1,4 @@
|
|||||||
{ buildGoModule, fetchFromGitHub, lib }:
|
{ buildGoModule, fetchFromGitHub, go, lib, makeWrapper }:
|
||||||
|
|
||||||
buildGoModule rec {
|
buildGoModule rec {
|
||||||
pname = "revive";
|
pname = "revive";
|
||||||
@ -33,6 +33,15 @@ buildGoModule rec {
|
|||||||
ldflags+=" -X 'github.com/mgechev/revive/cli.date=$(cat DATE)'"
|
ldflags+=" -X 'github.com/mgechev/revive/cli.date=$(cat DATE)'"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
allowGoReference = true;
|
||||||
|
|
||||||
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
|
|
||||||
|
postFixup = ''
|
||||||
|
wrapProgram $out/bin/revive \
|
||||||
|
--prefix PATH : ${lib.makeBinPath [ go ]}
|
||||||
|
'';
|
||||||
|
|
||||||
# The following tests fail when built by nix:
|
# The following tests fail when built by nix:
|
||||||
#
|
#
|
||||||
# $ nix log /nix/store/build-revive.1.3.9.drv | grep FAIL
|
# $ nix log /nix/store/build-revive.1.3.9.drv | grep FAIL
|
||||||
|
Loading…
Reference in New Issue
Block a user