about summary refs log tree commit diff
path: root/tests/pass-as-file.sh
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2015-02-17T13·42+0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2015-02-17T13·42+0100
commita70d275f3d25f6e1eb1b6d528ee07ecd7265ada5 (patch)
treea103bd4348be410ec66dbde0551ec3ad5d442a74 /tests/pass-as-file.sh
parent29e1ff675b6b8f1ba2cdcde599888ec3eebce9af (diff)
Allow passing attributes via files instead of environment variables
Closes #473.
Diffstat (limited to 'tests/pass-as-file.sh')
-rw-r--r--tests/pass-as-file.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/pass-as-file.sh b/tests/pass-as-file.sh
new file mode 100644
index 0000000000..b61576e057
--- /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
+  '';
+}
+")