Skip to content

Commit

Permalink
revive: ensure go is on the PATH at runtime
Browse files Browse the repository at this point in the history
This is needed due to mgechev/revive#993.
  • Loading branch information
yurrriq committed Aug 1, 2024
1 parent 849492e commit 38cfa2e
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion pkgs/development/tools/revive/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ buildGoModule, fetchFromGitHub, lib }:
{ buildGoModule, fetchFromGitHub, go, lib, makeWrapper }:

buildGoModule rec {
pname = "revive";
Expand Down Expand Up @@ -33,6 +33,15 @@ buildGoModule rec {
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:
#
# $ nix log /nix/store/build-revive.1.3.9.drv | grep FAIL
Expand Down

0 comments on commit 38cfa2e

Please sign in to comment.