Test the fake derivations channel, asserting nested packages are properly represented.
This is a breaking change. Previously, packages named `packageset.foo` would be exposed in the fake derivation channel as `packageset-foo`. Presumably this was done to avoid needing to track attribute sets, and to avoid the complexity. I think this now correctly handles the complexity and properly mirrors the input expressions layout.
This commit is contained in:
36
t/jobs/nested-attributes.nix
Normal file
36
t/jobs/nested-attributes.nix
Normal file
@ -0,0 +1,36 @@
|
||||
with import ./config.nix;
|
||||
rec {
|
||||
# Given a jobset containing a package set named X with an interior member Y,
|
||||
# expose the interior member Y with the name X-Y. This is to exercise a bug
|
||||
# in the NixExprs view's generated Nix expression which flattens the
|
||||
# package set namespace from `X.Y` to `X-Y`. If the bug is present, the
|
||||
# resulting expression incorrectly renders two `X-Y` packages.
|
||||
packageset = {
|
||||
recurseForDerivations = true;
|
||||
deeper = {
|
||||
recurseForDerivations = true;
|
||||
deeper = {
|
||||
recurseForDerivations = true;
|
||||
|
||||
nested = mkDerivation {
|
||||
name = "much-too-deep";
|
||||
builder = ./empty-dir-builder.sh;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
nested = mkDerivation {
|
||||
name = "actually-nested";
|
||||
builder = ./empty-dir-builder.sh;
|
||||
};
|
||||
|
||||
nested2 = mkDerivation {
|
||||
name = "actually-nested2";
|
||||
builder = ./empty-dir-builder.sh;
|
||||
};
|
||||
};
|
||||
packageset-nested = mkDerivation {
|
||||
name = "actually-top-level";
|
||||
builder = ./empty-dir-builder.sh;
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user