feat: add flattened package exports for improved CI visibility in flake.nix
All checks were successful
CI / list-packages (push) Successful in 3s
All checks were successful
CI / list-packages (push) Successful in 3s
This commit is contained in:
parent
7f154d659d
commit
1c370cfb62
2 changed files with 19 additions and 6 deletions
|
|
@ -21,8 +21,10 @@
|
|||
|
||||
packages.${system} = {
|
||||
inherit (pkgs) waterfox-bin xcursor-mizuki;
|
||||
};
|
||||
} // pkgs.pjsk-cursor.flat;
|
||||
|
||||
legacyPackages.${system} = (builtins.removeAttrs pkgs.pjsk-cursor [ "override" "overrideDerivation" ]);
|
||||
legacyPackages.${system} = {
|
||||
inherit (pkgs.pjsk-cursor) pjsk-cursor pjsk-cursors;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@ let
|
|||
};
|
||||
|
||||
# Individual cursors organized hierarchically
|
||||
# Structure: pjsk-cursor.<variant>.<group>.<character>
|
||||
pjsk-cursor-tree = lib.recurseIntoAttrs (lib.genAttrs [ "ani" "cur" ] (variant:
|
||||
lib.recurseIntoAttrs (lib.mapAttrs (group: characters:
|
||||
lib.recurseIntoAttrs (lib.genAttrs characters (character:
|
||||
|
|
@ -52,9 +51,6 @@ let
|
|||
else lib.concatLists (map collectDerivations (lib.attrValues (builtins.removeAttrs v [ "recurseForDerivations" ])));
|
||||
|
||||
# Joined cursors organized hierarchically
|
||||
# Structure: pjsk-cursors (all)
|
||||
# pjsk-cursors.<variant> (all in variant)
|
||||
# pjsk-cursors.<variant>.<group> (all in variant/group)
|
||||
pjsk-cursors-tree =
|
||||
let
|
||||
allJoined = symlinkJoin {
|
||||
|
|
@ -92,8 +88,23 @@ let
|
|||
in
|
||||
allJoined // lib.recurseIntoAttrs variants;
|
||||
|
||||
# Flatten everything for CI visibility in 'packages'
|
||||
flattenTree = prefix: tree:
|
||||
let
|
||||
recurse = p: t:
|
||||
if lib.isDerivation t then { "${p}" = t; }
|
||||
else if builtins.isAttrs t then
|
||||
lib.concatMapAttrs (n: v: if n == "recurseForDerivations" then { } else recurse (if p == "" then n else "${p}-${n}") v) t
|
||||
else { };
|
||||
in
|
||||
recurse prefix tree;
|
||||
|
||||
in
|
||||
{
|
||||
# Hierarchical access
|
||||
pjsk-cursor = pjsk-cursor-tree;
|
||||
pjsk-cursors = pjsk-cursors-tree;
|
||||
|
||||
# Flat access for CI
|
||||
flat = (flattenTree "pjsk-cursor" pjsk-cursor-tree) // (flattenTree "pjsk-cursors" pjsk-cursors-tree);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue