1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 06:31:14 +02:00

Test IFD/filterSource in a chroot

Relevant to #11503.
This commit is contained in:
Eelco Dolstra 2024-09-18 12:42:20 +02:00
parent ee3f0b7a8b
commit 8690b6f138
2 changed files with 47 additions and 11 deletions

View file

@ -1,7 +1,6 @@
with import ./config.nix;
let
rec {
bar = mkDerivation {
name = "bar";
builder = builtins.toFile "builder.sh"
@ -15,12 +14,20 @@ let
assert builtins.pathExists bar;
import bar;
in
result = mkDerivation {
name = "foo";
builder = builtins.toFile "builder.sh"
''
echo -n FOO${toString value} > $out
'';
};
mkDerivation {
name = "foo";
builder = builtins.toFile "builder.sh"
''
echo -n FOO${toString value} > $out
'';
addPath = mkDerivation {
name = "add-path";
src = builtins.filterSource (path: type: true) result;
builder = builtins.toFile "builder.sh"
''
echo -n BLA$(cat $src) > $out
'';
};
}