From fd2cba036cdc868521d791ddf11ccf0e01c5ec6b Mon Sep 17 00:00:00 2001 From: MaxHearnden Date: Mon, 28 Aug 2023 22:39:47 +0100 Subject: [PATCH] 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 --- pkgs/applications/networking/cluster/nomad/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/cluster/nomad/default.nix b/pkgs/applications/networking/cluster/nomad/default.nix index abe2e6ee7fe0..c1666e2f8002 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" ''; }; }