aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2021-11-08 13:53:30 +0100
committerGitHub <noreply@github.com>2021-11-08 13:53:30 +0100
commitc9ecc0948b872dc5d3c64accccfe6b1c27e83ef0 (patch)
tree7dcc3f9f203773a288ddf319060d5bcf0a44a436
parent0fd96eeb09b0892f69391563abf69f90804422f8 (diff)
parent93eadd5803caa6d28be056c58194be974a87aeb8 (diff)
Merge pull request #5506 from NixOS/fix-post-hook-test-with-different-daemon
Make the post-build-hook use the daemon Nix package
-rw-r--r--tests/common.sh.in5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/common.sh.in b/tests/common.sh.in
index 08f5e0a77..3d0d56120 100644
--- a/tests/common.sh.in
+++ b/tests/common.sh.in
@@ -36,8 +36,9 @@ export PATH=@bindir@:$PATH
if [[ -n "${NIX_CLIENT_PACKAGE:-}" ]]; then
export PATH="$NIX_CLIENT_PACKAGE/bin":$PATH
fi
+DAEMON_PATH="$PATH"
if [[ -n "${NIX_DAEMON_PACKAGE:-}" ]]; then
- export NIX_DAEMON_COMMAND="$NIX_DAEMON_PACKAGE/bin/nix-daemon"
+ DAEMON_PATH="${NIX_DAEMON_PACKAGE}:$DAEMON_PATH"
fi
coreutils=@coreutils@
@@ -89,7 +90,7 @@ startDaemon() {
# Start the daemon, wait for the socket to appear. !!!
# ‘nix-daemon’ should have an option to fork into the background.
rm -f $NIX_DAEMON_SOCKET_PATH
- ${NIX_DAEMON_COMMAND:-nix daemon} &
+ PATH=$DAEMON_PATH nix daemon &
for ((i = 0; i < 30; i++)); do
if [[ -S $NIX_DAEMON_SOCKET_PATH ]]; then break; fi
sleep 1