aboutsummaryrefslogtreecommitdiff
path: root/tests/readfile-context.nix
diff options
context:
space:
mode:
authorNikolay Amiantov <ab@fmap.me>2017-11-11 01:51:34 +0300
committerNikolay Amiantov <ab@fmap.me>2022-01-09 13:42:36 +0300
commit120ca245d13708743a59e83da12ec90902636236 (patch)
tree6c27cb21423959e3018932aa5fa6e0e228a292fa /tests/readfile-context.nix
parentc66865dff1747ecd55915ef8c549dc1a088ff168 (diff)
Add test for readFile keeping context
Diffstat (limited to 'tests/readfile-context.nix')
-rw-r--r--tests/readfile-context.nix19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/readfile-context.nix b/tests/readfile-context.nix
new file mode 100644
index 000000000..600036a94
--- /dev/null
+++ b/tests/readfile-context.nix
@@ -0,0 +1,19 @@
+with import ./config.nix;
+
+let
+
+ input = import ./simple.nix;
+
+ dependent = mkDerivation {
+ name = "dependent";
+ builder = ./readfile-context.builder.sh;
+ input = "${input}/hello";
+ };
+
+ readDependent = mkDerivation {
+ name = "read-dependent";
+ builder = ./readfile-context.builder.sh;
+ input = builtins.readFile dependent;
+ };
+
+in readDependent