aboutsummaryrefslogtreecommitdiff
path: root/tests/functional/pass-as-file.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/functional/pass-as-file.sh')
-rw-r--r--tests/functional/pass-as-file.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/functional/pass-as-file.sh b/tests/functional/pass-as-file.sh
new file mode 100644
index 000000000..2c0bc5031
--- /dev/null
+++ b/tests/functional/pass-as-file.sh
@@ -0,0 +1,18 @@
+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\" ''
+ [ \"\$(basename \$fooPath)\" = .attr-1bp7cri8hplaz6hbz0v4f0nl44rl84q1sg25kgwqzipzd1mv89ic ]
+ [ \"\$(cat \$fooPath)\" = xyzzy ]
+ touch \$out
+ '';
+}
+")