diff --git a/.forgejo/workflows/main.yml b/.forgejo/workflows/main.yml index f2044aa..3954291 100644 --- a/.forgejo/workflows/main.yml +++ b/.forgejo/workflows/main.yml @@ -16,10 +16,8 @@ jobs: - id: set-matrix run: | source /etc/bashrc - nix shell nixpkgs#jq -c bash -c " - PACKAGES=$(nix flake show --json | jq -c '.packages."x86_64-linux" | keys') - echo "packages=$PACKAGES" >> $GITHUB_OUTPUT - " + PACKAGES=$(nix flake show --json | nix run nixpkgs#jq -- -c '.packages."x86_64-linux" | keys') + echo "packages=$PACKAGES" >> $GITHUB_OUTPUT # check: # runs-on: x86_64 diff --git a/flake.lock b/flake.lock index 347f44c..839eaed 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1773734432, - "narHash": "sha256-IF5ppUWh6gHGHYDbtVUyhwy/i7D261P7fWD1bPefOsw=", + "lastModified": 1776877367, + "narHash": "sha256-EHq1/OX139R1RvBzOJ0aMRT3xnWyqtHBRUBuO1gFzjI=", "owner": "nixos", "repo": "nixpkgs", - "rev": "cda48547b432e8d3b18b4180ba07473762ec8558", + "rev": "0726a0ecb6d4e08f6adced58726b95db924cef57", "type": "github" }, "original": { diff --git a/pkgs/pjsk-cursor/default.nix b/pkgs/pjsk-cursor/default.nix index 07c9b0c..675d1c8 100644 --- a/pkgs/pjsk-cursor/default.nix +++ b/pkgs/pjsk-cursor/default.nix @@ -88,16 +88,48 @@ let in allJoined // lib.recurseIntoAttrs variants; - # Flatten everything for CI visibility in 'packages' - flattenTree = prefix: tree: + # Create flat attribute set for CI visibility + flatOutputs = 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 { }; + variantNames = [ "ani" "cur" ]; + groupNames = builtins.attrNames groups; + + # Individual cursors (e.g., pjsk-cursor-ani-n25-mizuki) + individuals = lib.concatLists (map + (v: + lib.concatLists (map + (g: + map (c: { + name = "pjsk-cursor-${v}-${g}-${c}"; + value = pjsk-cursor-tree.${v}.${g}.${c}; + }) groups.${g} + ) + groupNames) + ) + variantNames); + + # Group-joined cursors (e.g., pjsk-cursors-ani-n25) + groupJoined = lib.concatLists (map + (v: + map (g: { + name = "pjsk-cursors-${v}-${g}"; + value = pjsk-cursors-tree.${v}.${g}; + }) groupNames + ) + variantNames); + + # Variant-joined cursors (e.g., pjsk-cursors-ani) + variantJoined = map + (v: { + name = "pjsk-cursors-${v}"; + value = pjsk-cursors-tree.${v}; + }) + variantNames; + + # Top-level joined (pjsk-cursors) + allJoined = { name = "pjsk-cursors"; value = pjsk-cursors-tree; }; in - recurse prefix tree; + builtins.listToAttrs (individuals ++ groupJoined ++ variantJoined ++ [ allJoined ]); in { @@ -106,5 +138,5 @@ in pjsk-cursors = pjsk-cursors-tree; # Flat access for CI - flat = (flattenTree "pjsk-cursor" pjsk-cursor-tree) // (flattenTree "pjsk-cursors" pjsk-cursors-tree); + flat = flatOutputs; } \ No newline at end of file