1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-07 01:51:47 +02:00

Allow passing attributes via files instead of environment variables

Closes #473.
This commit is contained in:
Eelco Dolstra 2015-02-17 14:42:15 +01:00
parent 29e1ff675b
commit a70d275f3d
4 changed files with 55 additions and 5 deletions

17
tests/pass-as-file.sh Normal file
View file

@ -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
'';
}
")