Test that the result of readFile
gets ref-scanned
This commit is contained in:
parent
6bf8736517
commit
cb39e9a99e
|
@ -1 +0,0 @@
|
||||||
echo "$input" > $out
|
|
|
@ -6,14 +6,23 @@ let
|
||||||
|
|
||||||
dependent = mkDerivation {
|
dependent = mkDerivation {
|
||||||
name = "dependent";
|
name = "dependent";
|
||||||
builder = ./readfile-context.builder.sh;
|
buildCommand = ''
|
||||||
input = "${input}/hello";
|
mkdir -p $out
|
||||||
|
echo -n "$input1" > "$out/file1"
|
||||||
|
echo -n "$input2" > "$out/file2"
|
||||||
|
'';
|
||||||
|
input1 = "${input}/hello";
|
||||||
|
input2 = "hello";
|
||||||
};
|
};
|
||||||
|
|
||||||
readDependent = mkDerivation {
|
readDependent = mkDerivation {
|
||||||
name = "read-dependent";
|
# Will evaluate correctly because file2 doesn't have any references,
|
||||||
builder = ./readfile-context.builder.sh;
|
# even though the `dependent` derivation does.
|
||||||
input = builtins.readFile dependent;
|
name = builtins.readFile (dependent + "/file2");
|
||||||
|
buildCommand = ''
|
||||||
|
echo "$input" > "$out"
|
||||||
|
'';
|
||||||
|
input = builtins.readFile (dependent + "/file1");
|
||||||
};
|
};
|
||||||
|
|
||||||
in readDependent
|
in readDependent
|
||||||
|
|
Loading…
Reference in a new issue