* Test the impureEnvVars feature.

This commit is contained in:
Eelco Dolstra 2007-09-11 13:32:04 +00:00
parent 9441550acb
commit 3339f85447
3 changed files with 6 additions and 0 deletions

View File

@ -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 echo "Hello World!" > $out

View File

@ -10,6 +10,7 @@ rec {
outputHash = hash; outputHash = hash;
PATH = "@testPath@"; PATH = "@testPath@";
inherit dummy; inherit dummy;
impureEnvVars = ["IMPURE_VAR1" "IMPURE_VAR2"];
}; };
f = f2 ""; f = f2 "";

View File

@ -2,6 +2,9 @@ source common.sh
clearStore clearStore
export IMPURE_VAR1=foo
export IMPURE_VAR2=bar
echo 'testing good...' echo 'testing good...'
drvs=$($nixinstantiate fixed.nix -A good) drvs=$($nixinstantiate fixed.nix -A good)
echo $drvs echo $drvs