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

{gradle.fetchDeps,shattered-pixel-dungeon}: fix eval on Nix 2.3.18 #329212

Merged
merged 2 commits into from
Jul 24, 2024

Conversation

philiptaron
Copy link
Contributor

@philiptaron philiptaron commented Jul 22, 2024

Motivation

I discovered this problem developing tests for nixpkgs-check-by-name in NixOS/nixpkgs-vet#79. Nix 2.3.18 is nixVersions.minimum.

The changes were introduced in #272380. CC @chayleaf.

Description of changes

  • Use ./. + "relative path" instead of constructing a path with newer Nix syntax.
  • Use lib.compareLists instead of comparing lists directly.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
    • Nix 2.3.18 (nixVersions.minimum)
    • Nix 2.23.2 (nixVersions.latest)
    • Nix 2.18.5 (nixVersions.stable)
  • Fits CONTRIBUTING.md.

@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux labels Jul 22, 2024
@philiptaron philiptaron mentioned this pull request Jul 22, 2024
13 tasks
@philiptaron philiptaron marked this pull request as draft July 23, 2024 17:24
To reproduce, run `nix shell nixpkgs#nixVersions.minimum --command nix-build -A shattered-pixel-dungeon`
In 2.3, lists aren't able to be compared with `<`, but
`builtins.compareVersions` does exist.
@philiptaron philiptaron force-pushed the pr-272380/fix-nix-2.3.18-eval branch from 5d27c29 to 2b7232d Compare July 23, 2024 18:04
@philiptaron philiptaron marked this pull request as ready for review July 23, 2024 18:04
@philiptaron
Copy link
Contributor Author

OK, this should be better.

@philiptaron philiptaron requested a review from chayleaf July 23, 2024 18:05
@ofborg ofborg bot added 10.rebuild-darwin: 1-10 10.rebuild-darwin: 1 10.rebuild-linux: 1-10 10.rebuild-linux: 1 and removed 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux labels Jul 23, 2024
@chayleaf
Copy link
Contributor

Result of nixpkgs-review pr 329212 run on x86_64-linux 1

1 package built:
  • mucommander

@chayleaf
Copy link
Contributor

chayleaf commented Jul 23, 2024

the rebuild is because of the following:

--- a.json	2024-07-24 06:14:53.288998420 +0700
+++ b.json	2024-07-24 06:14:56.910078145 +0700
@@ -541,7 +541,7 @@
     "hash": "sha256-5e/PA5zZCWiMIB3FR5sUT9bwHw5AJSt/xefS4bXAeZA="
   },
   "https://repo.maven.apache.org/maven2/commons-codec/commons-codec/maven-metadata.xml": {
-    "text": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<metadata modelVersion=\"1.1.0\">\n  <groupId>commons-codec</groupId>\n  <artifactId>commons-codec</artifactId>\n  <versioning>\n    <latest>1.17.0</latest>\n    <release>1.17.0</release>\n    <versions>\n      <version>1.11</version>\n      <version>1.17.0</version>\n      <version>1.3</version>\n      <version>1.9</version>\n    </versions>\n    <lastUpdated>20240427124755</lastUpdated>\n  </versioning>\n</metadata>\n"
+    "text": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<metadata modelVersion=\"1.1.0\">\n  <groupId>commons-codec</groupId>\n  <artifactId>commons-codec</artifactId>\n  <versioning>\n    <latest>1.17.0</latest>\n    <release>1.17.0</release>\n    <versions>\n      <version>1.3</version>\n      <version>1.9</version>\n      <version>1.11</version>\n      <version>1.17.0</version>\n    </versions>\n    <lastUpdated>20240427124755</lastUpdated>\n  </versioning>\n</metadata>\n"
   },
   "https://repo.maven.apache.org/maven2/commons-collections/commons-collections/3.2.2/commons-collections-3.2.2.jar": {
     "hash": "sha256-7urpF5FxRKaKdB1MDf9mqlxcX9hVk/8he87T/Iyng7g="

which is more correct, so LGTM (nit: the diff could be made smaller by inlining the compare function)

@roberth roberth merged commit 0ad09cf into NixOS:master Jul 24, 2024
29 of 30 checks passed
@philiptaron philiptaron deleted the pr-272380/fix-nix-2.3.18-eval branch July 25, 2024 00:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants