mirror of
https://github.com/NixOS/nix.git
synced 2024-11-22 23:02:27 +00:00
a70d275f3d
Closes #473.
18 lines
296 B
Bash
18 lines
296 B
Bash
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
|
|
'';
|
|
}
|
|
")
|