diff --git a/flake.nix b/flake.nix index 29162ec..0653347 100644 --- a/flake.nix +++ b/flake.nix @@ -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; + }; }; } diff --git a/pkgs/pjsk-cursor/default.nix b/pkgs/pjsk-cursor/default.nix index 396bc54..07c9b0c 100644 --- a/pkgs/pjsk-cursor/default.nix +++ b/pkgs/pjsk-cursor/default.nix @@ -34,7 +34,6 @@ let }; # Individual cursors organized hierarchically - # Structure: pjsk-cursor... 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. (all in variant) - # pjsk-cursors.. (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); } \ No newline at end of file