Skip to content

Commit c9ecc09

Browse files
authored
Merge pull request NixOS#5506 from NixOS/fix-post-hook-test-with-different-daemon
Make the post-build-hook use the daemon Nix package
2 parents 0fd96ee + 93eadd5 commit c9ecc09

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/common.sh.in

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,9 @@ export PATH=@bindir@:$PATH
3636
if [[ -n "${NIX_CLIENT_PACKAGE:-}" ]]; then
3737
export PATH="$NIX_CLIENT_PACKAGE/bin":$PATH
3838
fi
39+
DAEMON_PATH="$PATH"
3940
if [[ -n "${NIX_DAEMON_PACKAGE:-}" ]]; then
40-
export NIX_DAEMON_COMMAND="$NIX_DAEMON_PACKAGE/bin/nix-daemon"
41+
DAEMON_PATH="${NIX_DAEMON_PACKAGE}:$DAEMON_PATH"
4142
fi
4243
coreutils=@coreutils@
4344

@@ -89,7 +90,7 @@ startDaemon() {
8990
# Start the daemon, wait for the socket to appear. !!!
9091
# ‘nix-daemon’ should have an option to fork into the background.
9192
rm -f $NIX_DAEMON_SOCKET_PATH
92-
${NIX_DAEMON_COMMAND:-nix daemon} &
93+
PATH=$DAEMON_PATH nix daemon &
9394
for ((i = 0; i < 30; i++)); do
9495
if [[ -S $NIX_DAEMON_SOCKET_PATH ]]; then break; fi
9596
sleep 1

0 commit comments

Comments
 (0)