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
This commit is contained in:
MaxHearnden 2023-08-28 22:39:47 +01:00
parent efed6046cf
commit fd2cba036c

View file

@ -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"
'';
};
}