New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dwarf-fortress: Update themes, add themes update script #79121
Conversation
curl "https://api.github.com/users/dfgraphics/repos" | jq -r '.[].name | ascii_downcase' | while read repo; do | ||
version="$(curl "https://api.github.com/repos/DFgraphics/${repo}/releases/latest" | jq -r .tag_name)" | ||
sha256="$(nix-prefetch-git "https://github.com/DFgraphics/${repo}" "${version}" | jq -r ".sha256")" | ||
echo "{}" | jq ".sha256=\"${sha256}\" | .name=\"${repo}\" | .version=\"${version}\"" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure if you can, but do you mind changing the order of version and sha? generally sha comes last with most fetches
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean just the key ordering? I actually sort the keys at the end. Is that undesirable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would say yes, however, it's generated output, so it might not matter so much.
However it's very typical for fetches to looks like:
src = fetchurl {
name = "...";
url = "...";
sha256 = "...";
};
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
which for this case I would say should look like:
{
name = "..";
version = "..";
sha = "..";
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, and removed the key sorting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
diff LGTM
commits LGTM
failure is related to latest staging-next merge
[34 built (1 failed), 14 copied (407.3 MiB), 329.6 MiB DL]
error: build of '/nix/store/qgkys6hg1av7afk8abh5xj90pbgp6hpq-env.drv' failed
https://github.com/NixOS/nixpkgs/pull/79121
1 package failed to build:
dwarf-fortress-packages.dwarf-fortress-full
10 package built:
dwarf-fortress-packages.cla-theme dwarf-fortress-packages.phoebus-theme dwarf-fortress-packages.themes.afro-graphics dwarf-fortress-packages.themes.dfgraphics dwarf-fortress-packages.themes.ironhand dwarf-fortress-packages.themes.jolly-bastion dwarf-fortress-packages.themes.mayday dwarf-fortress-packages.themes.obsidian dwarf-fortress-packages.themes.rally-ho dwarf-fortress-packages.themes.spacefox
Motivation for this change
There has been a new major Dwarf Fortress release, and the hardcoded themes json is stale. This PR adds a script to update the themes.json and also updates said themes.json.
Related to #78901, though it should not conflict and should be mergeable in parallel.
I didn't add myself to the maintainers set just to avoid a PR conflict, but happy to do that.
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)