Files
lix/tests/functional/check-outputs.nix
T
Maximilian Bosch 312e90f4b6 tests: add small testcase for output cycle detection
Change-Id: I186937dfbca4d051e5ad860239720816429a0a8e
2025-08-23 16:23:35 +02:00

26 lines
539 B
Nix

with import ./config.nix;
rec {
dep = import ./dependencies.nix {};
cycle = mkDerivation {
name = "cycle";
inherit dep;
outputs = [ "foo" "bar" "baz" ];
builder = builtins.toFile "builder.sh" ''
mkdir -p $foo/bin $bar/lib $baz/share
echo $bar > $foo/bin/alarm
echo $baz > $bar/lib/libfoo
echo $foo > $baz/share/lalala
'';
};
as_dependency = mkDerivation {
name = "depends-on-cycle";
inherit cycle;
builder = builtins.toFile "builder.sh" ''
touch $out
'';
};
}