refactor: optimize attribute flattening in pjsk-cursor package definition
Some checks failed
CI / list-packages (push) Successful in 13s
CI / build (pjsk-cursor-ani-leoneed-honami) (push) Successful in 8s
CI / build (pjsk-cursor-ani-leoneed-ichika) (push) Successful in 4s
CI / build (pjsk-cursor-ani-leoneed-miku) (push) Successful in 4s
CI / build (pjsk-cursor-ani-leoneed-saki) (push) Successful in 4s
CI / build (pjsk-cursor-ani-leoneed-shiho) (push) Successful in 5s
CI / build (pjsk-cursor-ani-mmj-airi) (push) Successful in 5s
CI / build (pjsk-cursor-ani-mmj-haruka) (push) Successful in 6s
CI / build (pjsk-cursor-ani-mmj-miku) (push) Successful in 5s
CI / build (pjsk-cursor-ani-mmj-minori) (push) Successful in 5s
CI / build (pjsk-cursor-ani-mmj-shizuku) (push) Successful in 5s
CI / build (pjsk-cursor-ani-n25-ena) (push) Successful in 5s
CI / build (pjsk-cursor-ani-n25-kanade) (push) Successful in 5s
CI / build (pjsk-cursor-ani-n25-miku) (push) Successful in 4s
CI / build (pjsk-cursor-ani-vbs-akito) (push) Successful in 4s
CI / build (pjsk-cursor-ani-vbs-an) (push) Successful in 4s
CI / build (pjsk-cursor-ani-vbs-kohane) (push) Successful in 4s
CI / build (pjsk-cursor-ani-vbs-miku) (push) Successful in 4s
CI / build (pjsk-cursor-ani-vbs-toya) (push) Successful in 4s
CI / build (pjsk-cursor-ani-virtualsinger-kaito) (push) Successful in 4s
CI / build (pjsk-cursor-ani-virtualsinger-len) (push) Successful in 4s
CI / build (pjsk-cursor-ani-virtualsinger-luka) (push) Successful in 4s
CI / build (pjsk-cursor-ani-virtualsinger-meiko) (push) Successful in 4s
CI / build (pjsk-cursor-ani-virtualsinger-rin) (push) Successful in 4s
CI / build (pjsk-cursor-ani-wxs-emu) (push) Successful in 4s
CI / build (pjsk-cursor-ani-wxs-nene) (push) Successful in 4s
CI / build (pjsk-cursor-ani-wxs-rui) (push) Successful in 4s
CI / build (pjsk-cursor-ani-n25-mafuyu) (push) Successful in 4s
CI / build (pjsk-cursor-ani-n25-mizuki) (push) Successful in 4s
CI / build (pjsk-cursor-ani-virtualsinger-miku) (push) Successful in 4s
CI / build (pjsk-cursor-ani-wxs-miku) (push) Successful in 4s
CI / build (pjsk-cursor-ani-wxs-tsukasa) (push) Successful in 4s
CI / build (pjsk-cursor-cur-leoneed-ichika) (push) Successful in 4s
CI / build (pjsk-cursor-cur-leoneed-miku) (push) Successful in 4s
CI / build (pjsk-cursor-cur-leoneed-saki) (push) Successful in 4s
CI / build (pjsk-cursor-cur-mmj-airi) (push) Successful in 4s
CI / build (pjsk-cursor-cur-n25-kanade) (push) Has been cancelled
CI / build (pjsk-cursor-cur-vbs-kohane) (push) Has been cancelled
CI / build (pjsk-cursor-cur-virtualsinger-meiko) (push) Has been cancelled
CI / build (pjsk-cursor-cur-wxs-rui) (push) Has been cancelled
CI / build (pjsk-cursors-ani-n25) (push) Has been cancelled
CI / build (pjsk-cursors-cur-mmj) (push) Has been cancelled
CI / build (pjsk-cursor-cur-mmj-miku) (push) Has been cancelled
CI / build (pjsk-cursor-cur-mmj-minori) (push) Has been cancelled
CI / build (pjsk-cursor-cur-leoneed-honami) (push) Successful in 4s
CI / build (pjsk-cursor-cur-leoneed-shiho) (push) Successful in 4s
CI / build (pjsk-cursor-cur-mmj-haruka) (push) Has been cancelled
CI / build (pjsk-cursors-ani-leoneed) (push) Has been cancelled
CI / build (pjsk-cursors-ani-mmj) (push) Has been cancelled
CI / build (pjsk-cursors-ani-vbs) (push) Has been cancelled
CI / build (pjsk-cursors-ani-virtualsinger) (push) Has been cancelled
CI / build (pjsk-cursors-ani-wxs) (push) Has been cancelled
CI / build (pjsk-cursors-cur) (push) Has been cancelled
CI / build (pjsk-cursors-cur-leoneed) (push) Has been cancelled
CI / build (pjsk-cursors-cur-n25) (push) Has been cancelled
CI / build (pjsk-cursors-cur-vbs) (push) Has been cancelled
CI / build (pjsk-cursors-cur-virtualsinger) (push) Has been cancelled
CI / build (pjsk-cursors-cur-wxs) (push) Has been cancelled
CI / build (waterfox-bin) (push) Has been cancelled
CI / build (xcursor-mizuki) (push) Has been cancelled
CI / build (pjsk-cursor-cur-mmj-shizuku) (push) Has been cancelled
CI / build (pjsk-cursor-cur-n25-ena) (push) Has been cancelled
CI / build (pjsk-cursor-cur-n25-mafuyu) (push) Has been cancelled
CI / build (pjsk-cursor-cur-n25-miku) (push) Has been cancelled
CI / build (pjsk-cursor-cur-n25-mizuki) (push) Has been cancelled
CI / build (pjsk-cursor-cur-vbs-akito) (push) Has been cancelled
CI / build (pjsk-cursor-cur-vbs-an) (push) Has been cancelled
CI / build (pjsk-cursor-cur-vbs-miku) (push) Has been cancelled
CI / build (pjsk-cursor-cur-vbs-toya) (push) Has been cancelled
CI / build (pjsk-cursor-cur-virtualsinger-kaito) (push) Has been cancelled
CI / build (pjsk-cursor-cur-virtualsinger-len) (push) Has been cancelled
CI / build (pjsk-cursor-cur-virtualsinger-luka) (push) Has been cancelled
CI / build (pjsk-cursor-cur-virtualsinger-miku) (push) Has been cancelled
CI / build (pjsk-cursor-cur-virtualsinger-rin) (push) Has been cancelled
CI / build (pjsk-cursor-cur-wxs-emu) (push) Has been cancelled
CI / build (pjsk-cursor-cur-wxs-miku) (push) Has been cancelled
CI / build (pjsk-cursor-cur-wxs-nene) (push) Has been cancelled
CI / build (pjsk-cursor-cur-wxs-tsukasa) (push) Has been cancelled
CI / build (pjsk-cursors) (push) Has been cancelled
CI / build (pjsk-cursors-ani) (push) Has been cancelled
Some checks failed
CI / list-packages (push) Successful in 13s
CI / build (pjsk-cursor-ani-leoneed-honami) (push) Successful in 8s
CI / build (pjsk-cursor-ani-leoneed-ichika) (push) Successful in 4s
CI / build (pjsk-cursor-ani-leoneed-miku) (push) Successful in 4s
CI / build (pjsk-cursor-ani-leoneed-saki) (push) Successful in 4s
CI / build (pjsk-cursor-ani-leoneed-shiho) (push) Successful in 5s
CI / build (pjsk-cursor-ani-mmj-airi) (push) Successful in 5s
CI / build (pjsk-cursor-ani-mmj-haruka) (push) Successful in 6s
CI / build (pjsk-cursor-ani-mmj-miku) (push) Successful in 5s
CI / build (pjsk-cursor-ani-mmj-minori) (push) Successful in 5s
CI / build (pjsk-cursor-ani-mmj-shizuku) (push) Successful in 5s
CI / build (pjsk-cursor-ani-n25-ena) (push) Successful in 5s
CI / build (pjsk-cursor-ani-n25-kanade) (push) Successful in 5s
CI / build (pjsk-cursor-ani-n25-miku) (push) Successful in 4s
CI / build (pjsk-cursor-ani-vbs-akito) (push) Successful in 4s
CI / build (pjsk-cursor-ani-vbs-an) (push) Successful in 4s
CI / build (pjsk-cursor-ani-vbs-kohane) (push) Successful in 4s
CI / build (pjsk-cursor-ani-vbs-miku) (push) Successful in 4s
CI / build (pjsk-cursor-ani-vbs-toya) (push) Successful in 4s
CI / build (pjsk-cursor-ani-virtualsinger-kaito) (push) Successful in 4s
CI / build (pjsk-cursor-ani-virtualsinger-len) (push) Successful in 4s
CI / build (pjsk-cursor-ani-virtualsinger-luka) (push) Successful in 4s
CI / build (pjsk-cursor-ani-virtualsinger-meiko) (push) Successful in 4s
CI / build (pjsk-cursor-ani-virtualsinger-rin) (push) Successful in 4s
CI / build (pjsk-cursor-ani-wxs-emu) (push) Successful in 4s
CI / build (pjsk-cursor-ani-wxs-nene) (push) Successful in 4s
CI / build (pjsk-cursor-ani-wxs-rui) (push) Successful in 4s
CI / build (pjsk-cursor-ani-n25-mafuyu) (push) Successful in 4s
CI / build (pjsk-cursor-ani-n25-mizuki) (push) Successful in 4s
CI / build (pjsk-cursor-ani-virtualsinger-miku) (push) Successful in 4s
CI / build (pjsk-cursor-ani-wxs-miku) (push) Successful in 4s
CI / build (pjsk-cursor-ani-wxs-tsukasa) (push) Successful in 4s
CI / build (pjsk-cursor-cur-leoneed-ichika) (push) Successful in 4s
CI / build (pjsk-cursor-cur-leoneed-miku) (push) Successful in 4s
CI / build (pjsk-cursor-cur-leoneed-saki) (push) Successful in 4s
CI / build (pjsk-cursor-cur-mmj-airi) (push) Successful in 4s
CI / build (pjsk-cursor-cur-n25-kanade) (push) Has been cancelled
CI / build (pjsk-cursor-cur-vbs-kohane) (push) Has been cancelled
CI / build (pjsk-cursor-cur-virtualsinger-meiko) (push) Has been cancelled
CI / build (pjsk-cursor-cur-wxs-rui) (push) Has been cancelled
CI / build (pjsk-cursors-ani-n25) (push) Has been cancelled
CI / build (pjsk-cursors-cur-mmj) (push) Has been cancelled
CI / build (pjsk-cursor-cur-mmj-miku) (push) Has been cancelled
CI / build (pjsk-cursor-cur-mmj-minori) (push) Has been cancelled
CI / build (pjsk-cursor-cur-leoneed-honami) (push) Successful in 4s
CI / build (pjsk-cursor-cur-leoneed-shiho) (push) Successful in 4s
CI / build (pjsk-cursor-cur-mmj-haruka) (push) Has been cancelled
CI / build (pjsk-cursors-ani-leoneed) (push) Has been cancelled
CI / build (pjsk-cursors-ani-mmj) (push) Has been cancelled
CI / build (pjsk-cursors-ani-vbs) (push) Has been cancelled
CI / build (pjsk-cursors-ani-virtualsinger) (push) Has been cancelled
CI / build (pjsk-cursors-ani-wxs) (push) Has been cancelled
CI / build (pjsk-cursors-cur) (push) Has been cancelled
CI / build (pjsk-cursors-cur-leoneed) (push) Has been cancelled
CI / build (pjsk-cursors-cur-n25) (push) Has been cancelled
CI / build (pjsk-cursors-cur-vbs) (push) Has been cancelled
CI / build (pjsk-cursors-cur-virtualsinger) (push) Has been cancelled
CI / build (pjsk-cursors-cur-wxs) (push) Has been cancelled
CI / build (waterfox-bin) (push) Has been cancelled
CI / build (xcursor-mizuki) (push) Has been cancelled
CI / build (pjsk-cursor-cur-mmj-shizuku) (push) Has been cancelled
CI / build (pjsk-cursor-cur-n25-ena) (push) Has been cancelled
CI / build (pjsk-cursor-cur-n25-mafuyu) (push) Has been cancelled
CI / build (pjsk-cursor-cur-n25-miku) (push) Has been cancelled
CI / build (pjsk-cursor-cur-n25-mizuki) (push) Has been cancelled
CI / build (pjsk-cursor-cur-vbs-akito) (push) Has been cancelled
CI / build (pjsk-cursor-cur-vbs-an) (push) Has been cancelled
CI / build (pjsk-cursor-cur-vbs-miku) (push) Has been cancelled
CI / build (pjsk-cursor-cur-vbs-toya) (push) Has been cancelled
CI / build (pjsk-cursor-cur-virtualsinger-kaito) (push) Has been cancelled
CI / build (pjsk-cursor-cur-virtualsinger-len) (push) Has been cancelled
CI / build (pjsk-cursor-cur-virtualsinger-luka) (push) Has been cancelled
CI / build (pjsk-cursor-cur-virtualsinger-miku) (push) Has been cancelled
CI / build (pjsk-cursor-cur-virtualsinger-rin) (push) Has been cancelled
CI / build (pjsk-cursor-cur-wxs-emu) (push) Has been cancelled
CI / build (pjsk-cursor-cur-wxs-miku) (push) Has been cancelled
CI / build (pjsk-cursor-cur-wxs-nene) (push) Has been cancelled
CI / build (pjsk-cursor-cur-wxs-tsukasa) (push) Has been cancelled
CI / build (pjsk-cursors) (push) Has been cancelled
CI / build (pjsk-cursors-ani) (push) Has been cancelled
This commit is contained in:
parent
1c370cfb62
commit
508cd607e1
3 changed files with 46 additions and 16 deletions
|
|
@ -16,10 +16,8 @@ jobs:
|
||||||
- id: set-matrix
|
- id: set-matrix
|
||||||
run: |
|
run: |
|
||||||
source /etc/bashrc
|
source /etc/bashrc
|
||||||
nix shell nixpkgs#jq -c bash -c "
|
PACKAGES=$(nix flake show --json | nix run nixpkgs#jq -- -c '.packages."x86_64-linux" | keys')
|
||||||
PACKAGES=$(nix flake show --json | jq -c '.packages."x86_64-linux" | keys')
|
echo "packages=$PACKAGES" >> $GITHUB_OUTPUT
|
||||||
echo "packages=$PACKAGES" >> $GITHUB_OUTPUT
|
|
||||||
"
|
|
||||||
|
|
||||||
# check:
|
# check:
|
||||||
# runs-on: x86_64
|
# runs-on: x86_64
|
||||||
|
|
|
||||||
6
flake.lock
generated
6
flake.lock
generated
|
|
@ -2,11 +2,11 @@
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1773734432,
|
"lastModified": 1776877367,
|
||||||
"narHash": "sha256-IF5ppUWh6gHGHYDbtVUyhwy/i7D261P7fWD1bPefOsw=",
|
"narHash": "sha256-EHq1/OX139R1RvBzOJ0aMRT3xnWyqtHBRUBuO1gFzjI=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "cda48547b432e8d3b18b4180ba07473762ec8558",
|
"rev": "0726a0ecb6d4e08f6adced58726b95db924cef57",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
||||||
|
|
@ -88,16 +88,48 @@ let
|
||||||
in
|
in
|
||||||
allJoined // lib.recurseIntoAttrs variants;
|
allJoined // lib.recurseIntoAttrs variants;
|
||||||
|
|
||||||
# Flatten everything for CI visibility in 'packages'
|
# Create flat attribute set for CI visibility
|
||||||
flattenTree = prefix: tree:
|
flatOutputs =
|
||||||
let
|
let
|
||||||
recurse = p: t:
|
variantNames = [ "ani" "cur" ];
|
||||||
if lib.isDerivation t then { "${p}" = t; }
|
groupNames = builtins.attrNames groups;
|
||||||
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
|
# Individual cursors (e.g., pjsk-cursor-ani-n25-mizuki)
|
||||||
else { };
|
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
|
in
|
||||||
recurse prefix tree;
|
builtins.listToAttrs (individuals ++ groupJoined ++ variantJoined ++ [ allJoined ]);
|
||||||
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
@ -106,5 +138,5 @@ in
|
||||||
pjsk-cursors = pjsk-cursors-tree;
|
pjsk-cursors = pjsk-cursors-tree;
|
||||||
|
|
||||||
# Flat access for CI
|
# Flat access for CI
|
||||||
flat = (flattenTree "pjsk-cursor" pjsk-cursor-tree) // (flattenTree "pjsk-cursors" pjsk-cursors-tree);
|
flat = flatOutputs;
|
||||||
}
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue