feat: add flattened package exports for improved CI visibility in flake.nix
All checks were successful
CI / list-packages (push) Successful in 3s

This commit is contained in:
암냥 2026-04-25 12:55:22 +09:00
commit 1c370cfb62
No known key found for this signature in database
2 changed files with 19 additions and 6 deletions

View file

@ -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;
};
};
}

View file

@ -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);
}