From a70d275f3d25f6e1eb1b6d528ee07ecd7265ada5 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 17 Feb 2015 14:42:15 +0100 Subject: Allow passing attributes via files instead of environment variables Closes #473. --- tests/pass-as-file.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 tests/pass-as-file.sh (limited to 'tests/pass-as-file.sh') diff --git a/tests/pass-as-file.sh b/tests/pass-as-file.sh new file mode 100644 index 000000000000..b61576e05799 --- /dev/null +++ b/tests/pass-as-file.sh @@ -0,0 +1,17 @@ +source common.sh + +clearStore + +outPath=$(nix-build --no-out-link -E " +with import ./config.nix; + +mkDerivation { + name = \"pass-as-file\"; + passAsFile = [ \"foo\" ]; + foo = [ \"xyzzy\" ]; + builder = builtins.toFile \"builder.sh\" '' + [ \"\$(cat \$foo)\" = xyzzy ] + touch \$out + ''; +} +") -- cgit 1.4.1