summary refs log tree commit diff
diff options
context:
space:
mode:
authorMaxHearnden <maxoscarhearnden@gmail.com>2023-08-28 22:39:47 +0100
committerMaxHearnden <maxoscarhearnden@gmail.com>2023-08-28 22:39:47 +0100
commitfd2cba036cdc868521d791ddf11ccf0e01c5ec6b (patch)
tree9ea66b1e29c2e4e8cb6f377cb1d93727bee53bb1
parentefed6046cf64a6c64d0f62ff38840a238e882adc (diff)
downloadnixpkgs-fd2cba036cdc868521d791ddf11ccf0e01c5ec6b.tar
nixpkgs-fd2cba036cdc868521d791ddf11ccf0e01c5ec6b.tar.gz
nixpkgs-fd2cba036cdc868521d791ddf11ccf0e01c5ec6b.tar.bz2
nixpkgs-fd2cba036cdc868521d791ddf11ccf0e01c5ec6b.tar.lz
nixpkgs-fd2cba036cdc868521d791ddf11ccf0e01c5ec6b.tar.xz
nixpkgs-fd2cba036cdc868521d791ddf11ccf0e01c5ec6b.tar.zst
nixpkgs-fd2cba036cdc868521d791ddf11ccf0e01c5ec6b.zip
nomad: use $NIX_BUILD_TOP for build directory
The preCheck step would add /build/go/bin to PATH which is incorrect
when the build directory is somewhere else (e.g. on most mac systems)

fixes https://github.com/NixOS/nixpkgs/issues/251885
-rw-r--r--pkgs/applications/networking/cluster/nomad/default.nix4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkgs/applications/networking/cluster/nomad/default.nix b/pkgs/applications/networking/cluster/nomad/default.nix
index abe2e6ee7fe..c1666e2f800 100644
--- a/pkgs/applications/networking/cluster/nomad/default.nix
+++ b/pkgs/applications/networking/cluster/nomad/default.nix
@@ -82,7 +82,7 @@ rec {
     vendorSha256 = "sha256-y3WiQuoQn6SdwTgtPWuB6EBtsJC+YleQPzownZQNkno=";
     passthru.tests.nomad = nixosTests.nomad;
     preCheck = ''
-      export PATH="$PATH:/build/go/bin"
+      export PATH="$PATH:$NIX_BUILD_TOP/go/bin"
     '';
   };
 
@@ -93,7 +93,7 @@ rec {
     vendorSha256 = "sha256-Y3O7ADzZPlLWFbXSYBcI6b5MAhMD0UnkhQxO9VJMpOY=";
     passthru.tests.nomad = nixosTests.nomad;
     preCheck = ''
-      export PATH="$PATH:/build/go/bin"
+      export PATH="$PATH:$NIX_BUILD_TOP/go/bin"
     '';
   };
 }