Skip to content
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

Merged
merged 2 commits into from Feb 3, 2020

Conversation

@shazow
Copy link
Contributor

@shazow shazow commented Feb 2, 2020

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
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
@shazow shazow marked this pull request as ready for review Feb 2, 2020
@shazow shazow requested review from jonringer, tomberek, abbradar and bendlas Feb 2, 2020
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}\""

This comment has been minimized.

@jonringer

jonringer Feb 2, 2020
Contributor

not sure if you can, but do you mind changing the order of version and sha? generally sha comes last with most fetches

This comment has been minimized.

@shazow

shazow Feb 2, 2020
Author Contributor

Do you mean just the key ordering? I actually sort the keys at the end. Is that undesirable?

This comment has been minimized.

@jonringer

jonringer Feb 2, 2020
Contributor

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 = "...";
};

This comment has been minimized.

@jonringer

jonringer Feb 2, 2020
Contributor

which for this case I would say should look like:

{
  name = "..";
  version = "..";
  sha = "..";
}

This comment has been minimized.

@shazow

shazow Feb 3, 2020
Author Contributor

Done, and removed the key sorting.

@shazow shazow force-pushed the shazow:df2020 branch from f1ea51e to f0200c5 Feb 3, 2020
Copy link
Contributor

@jonringer jonringer left a comment

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
@jonringer jonringer merged commit 1a0f594 into NixOS:master Feb 3, 2020
15 checks passed
15 checks passed
dwarf-fortress on aarch64-linux No attempt
Details
dwarf-fortress on x86_64-linux No attempt
Details
Evaluation Performance Report Evaluator Performance Report
Details
grahamcofborg-eval ^.^!
Details
grahamcofborg-eval-check-maintainers matching changed paths to changed attrs...
Details
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
grahamcofborg-eval-darwin nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A darwin-tested
Details
grahamcofborg-eval-nixos nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release-combined.nix -A tested
Details
grahamcofborg-eval-nixos-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A manual
Details
grahamcofborg-eval-nixos-options nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A options
Details
grahamcofborg-eval-nixpkgs-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A manual
Details
grahamcofborg-eval-nixpkgs-tarball nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A tarball
Details
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A unstable
Details
grahamcofborg-eval-package-list nix-env -qa --json --file .
Details
grahamcofborg-eval-package-list-no-aliases nix-env -qa --json --file . --arg config { allowAliases = false; }
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.