From 3339f854473863c8780e537626f457be0b2b33e2 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 11 Sep 2007 13:32:04 +0000 Subject: [PATCH] * Test the impureEnvVars feature. --- tests/fixed.builder1.sh | 2 ++ tests/fixed.nix.in | 1 + tests/fixed.sh | 3 +++ 3 files changed, 6 insertions(+) diff --git a/tests/fixed.builder1.sh b/tests/fixed.builder1.sh index c792f52a5..c41bb2b9a 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 c7dd99e6f..5d364eb39 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 d0a284af4..72038adfc 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