about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2017-02-24T16·25+0100
committerEelco Dolstra <edolstra@gmail.com>2017-02-24T16·29+0100
commit89ffe1eff946639aa2752177fcc5159b6926af70 (patch)
treeb884d3b966d402a66fba46ff7ca771df422d0c1a /tests
parentd3e1aad421a88a7a075cac25142c49224b3ecca2 (diff)
Fix nix-shell tests
The nix-shell fix in 668fef2e4f1c7758e2a55e355b4826014d5b7ba9 revealed
that we had some --pure tests that incorrectly depended on PATH from
config.nix's mkDerivation being overwritten by the caller's PATH.

http://hydra.nixos.org/build/49242478
Diffstat (limited to 'tests')
-rw-r--r--tests/nix-shell.sh1
-rw-r--r--tests/shell.nix1
2 files changed, 2 insertions, 0 deletions
diff --git a/tests/nix-shell.sh b/tests/nix-shell.sh
index 26cc521bbc..f0f34a5f87 100644
--- a/tests/nix-shell.sh
+++ b/tests/nix-shell.sh
@@ -4,6 +4,7 @@ clearStore
 
 # Test nix-shell -A
 export IMPURE_VAR=foo
+export NIX_BUILD_SHELL=$SHELL
 output=$(nix-shell --pure shell.nix -A shellDrv --run \
     'echo "$IMPURE_VAR - $VAR_FROM_STDENV_SETUP - $VAR_FROM_NIX"')
 
diff --git a/tests/shell.nix b/tests/shell.nix
index ed4d6fbaaa..1a092913b3 100644
--- a/tests/shell.nix
+++ b/tests/shell.nix
@@ -34,6 +34,7 @@ rec {
     mkdir -p $out/bin
     echo 'echo foo' > $out/bin/foo
     chmod a+rx $out/bin/foo
+    ln -s ${shell} $out/bin/bash
   '';
 
   bar = runCommand "bar" {} ''