Skip to content

treewide(java-users): clean callPackage overrides, by-name some#443954

Merged
jopejoe1 merged 1 commit intoNixOS:masterfrom
tomodachi94:enhance/treewide/java-overrides-cleanup
Sep 27, 2025
Merged

treewide(java-users): clean callPackage overrides, by-name some#443954
jopejoe1 merged 1 commit intoNixOS:masterfrom
tomodachi94:enhance/treewide/java-overrides-cleanup

Conversation

@tomodachi94
Copy link
Member

@tomodachi94 tomodachi94 commented Sep 18, 2025

Attn: please go to #444420 to discuss the usage of the pattern being removed here.

Most usages of the pattern of setting the specific jdk version via callPackage have been moved to
'let ... in' blocks.

Patterns I searched for:

  • jdk =
  • jdk_headless =
  • jre =
  • jfx =

See commit message for more details about specific changes.

This commit should cause no rebuilds.

Things done

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

Add a 👍 reaction to pull requests you find important.

@tomodachi94 tomodachi94 force-pushed the enhance/treewide/java-overrides-cleanup branch 3 times, most recently from f9e8483 to 69a84bc Compare September 18, 2025 05:58
@tomodachi94 tomodachi94 marked this pull request as draft September 18, 2025 06:01
@tomodachi94 tomodachi94 force-pushed the enhance/treewide/java-overrides-cleanup branch 14 times, most recently from b1fb3fa to 3bd283a Compare September 18, 2025 22:07
@tomodachi94 tomodachi94 changed the title treewide: Java-related callPackage cleanup treewide: migrate 37 Java-consuming packages to by-name Sep 18, 2025
@tomodachi94 tomodachi94 force-pushed the enhance/treewide/java-overrides-cleanup branch 3 times, most recently from d4ca457 to bf9792a Compare September 18, 2025 22:30
@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 6.topic: jupyter Interactive computing tooling: kernels, notebook, jupyterlab 6.topic: games Gaming on NixOS labels Sep 18, 2025
@tomodachi94 tomodachi94 force-pushed the enhance/treewide/java-overrides-cleanup branch from bf9792a to be9af41 Compare September 19, 2025 01:10
@tomodachi94 tomodachi94 changed the title treewide: migrate 37 Java-consuming packages to by-name treewide: migrate 28 Java-consuming packages to by-name Sep 19, 2025
@nixpkgs-ci nixpkgs-ci bot added the 2.status: merge conflict This PR has merge conflicts with the target branch label Sep 21, 2025
@tomodachi94
Copy link
Member Author

@wolfgangwalther should I drop the changes to maptool also?

@rhendric
Copy link
Member

Yes, those changes were obsoleted by my serendipitous discovery that 1.18.5 does work with the default JRE, unlike previous versions.

@tomodachi94 tomodachi94 force-pushed the enhance/treewide/java-overrides-cleanup branch from 1e9c2b6 to 4a02536 Compare September 21, 2025 19:15
@nixpkgs-ci nixpkgs-ci bot added 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages. and removed 2.status: merge conflict This PR has merge conflicts with the target branch 6.topic: games Gaming on NixOS labels Sep 21, 2025
@tomodachi94
Copy link
Member Author

tomodachi94 commented Sep 21, 2025

Also attempting to backport this to make backports of version updates easier (less merge conflicts).

@tomodachi94 tomodachi94 force-pushed the enhance/treewide/java-overrides-cleanup branch from 4a02536 to dd1058b Compare September 22, 2025 05:26
@tomodachi94 tomodachi94 added the 2.status: merge conflict This PR has merge conflicts with the target branch label Sep 24, 2025
**This commit should cause no rebuilds.**

# Moving Java overrides out of all-packages

All usages of this pattern have been moved to
'let ... in' blocks.

Patterns I searched for:
* `jdk =`
* `jdk_headless =`
* `jre =`
* `jfx =`

The `jing` alias has been moved to aliases.nix, so
update the usage of `jing` in `xmloscopy` to
`jing-trang`.

cassandra was ignored because that derivation
involves code generation.

I ignored grails, because jdk is set to null by
default by an override in all-packages.nix. That
package would need a slightly larger refactor to
deal with.

Packages with a *-native variant were ignored because
those would need to be refactored.

jetbrains was ignored because that might be a special case?

I ignored virtualbox, because I did not want
to touch the usages of the pattern for other
dependencies.
@tomodachi94 tomodachi94 force-pushed the enhance/treewide/java-overrides-cleanup branch from dd1058b to a4dd7db Compare September 25, 2025 03:46
@nixpkgs-ci nixpkgs-ci bot removed 2.status: merge conflict This PR has merge conflicts with the target branch 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. labels Sep 25, 2025
@nix-owners nix-owners bot requested a review from Gerschtli September 25, 2025 03:52
Copy link
Member

@jopejoe1 jopejoe1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like an improvement to me!

@nixpkgs-ci nixpkgs-ci bot added 12.approvals: 2 This PR was reviewed and approved by two persons. and removed 12.approvals: 1 This PR was reviewed and approved by one person. labels Sep 25, 2025
@jopejoe1 jopejoe1 added this pull request to the merge queue Sep 27, 2025
Merged via the queue into NixOS:master with commit 5ee06ac Sep 27, 2025
30 of 32 checks passed
@nixpkgs-ci
Copy link
Contributor

nixpkgs-ci bot commented Sep 27, 2025

Backport failed for release-25.05, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin release-25.05
git worktree add -d .worktree/backport-443954-to-release-25.05 origin/release-25.05
cd .worktree/backport-443954-to-release-25.05
git switch --create backport-443954-to-release-25.05
git cherry-pick -x a4dd7db0dc40f13289806c91c67a8bdd6f38ce96

@tomodachi94 tomodachi94 deleted the enhance/treewide/java-overrides-cleanup branch September 27, 2025 19:18
mdaniels5757 added a commit to mdaniels5757/nixpkgs that referenced this pull request Oct 6, 2025
This was broken by NixOS#443954
@mdaniels5757 mdaniels5757 mentioned this pull request Oct 6, 2025
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 12.approvals: 2 This PR was reviewed and approved by two persons. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants