about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--tests/fixed.builder1.sh2
-rw-r--r--tests/fixed.nix.in1
-rw-r--r--tests/fixed.sh3
3 files changed, 6 insertions, 0 deletions
diff --git a/tests/fixed.builder1.sh b/tests/fixed.builder1.sh
index c792f52a5608..c41bb2b9a611 100644
--- a/tests/fixed.builder1.sh
+++ b/tests/fixed.builder1.sh
@@ -1 +1,3 @@
+if test "$IMPURE_VAR1" != "foo"; then exit 1; fi
+if test "$IMPURE_VAR2" != "bar"; then exit 1; fi
 echo "Hello World!" > $out
diff --git a/tests/fixed.nix.in b/tests/fixed.nix.in
index c7dd99e6f214..5d364eb39ea5 100644
--- a/tests/fixed.nix.in
+++ b/tests/fixed.nix.in
@@ -10,6 +10,7 @@ rec {
     outputHash = hash;
     PATH = "@testPath@";
     inherit dummy;
+    impureEnvVars = ["IMPURE_VAR1" "IMPURE_VAR2"];
   };
 
   f = f2 "";
diff --git a/tests/fixed.sh b/tests/fixed.sh
index d0a284af48c4..72038adfce83 100644
--- a/tests/fixed.sh
+++ b/tests/fixed.sh
@@ -2,6 +2,9 @@ source common.sh
 
 clearStore
 
+export IMPURE_VAR1=foo
+export IMPURE_VAR2=bar
+
 echo 'testing good...'
 drvs=$($nixinstantiate fixed.nix -A good)
 echo $drvs