diff --git a/tests/fixed.builder1.sh b/tests/fixed.builder1.sh index c792f52a..c41bb2b9 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 c7dd99e6..5d364eb3 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 d0a284af..72038adf 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