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
jabba: easy access to various JDK versions #105924
Conversation
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/retirement-of-old-openjdk-releases/9929/18 |
c0ee972
to
aa87cbc
Compare
It doesn't run GUI applications: https://github.com/taku0/JavaSample/blob/master/JavaSample.java |
Thanks! I added patchelf invocations to correctly link the X11 libraries - now the example starts, but doesn't work correctly yet (something around finding fonts) |
It seems that there are more libraries JDK depends on:
|
I think https://lazamar.co.uk/nix-versions/?channel=nixpkgs-unstable&package=openjdk already achieves something pretty close to what you want here. Obviously we can't go back in time to add versions that were missed, but over time it should get better. I don't think it makes sense to keep all these versions at the tip of nixpkgs forever. |
As a developer it can sometimes be helpful to test/run code on a variety of different JDK variants and versions. Typically distributions ship only a few variants/versions, and you'd rely on a tool like jabba or sdkman to install specific different ones. Now those tools are not very 'nix-like'. This PR introduces a more 'nix-like' way of downloading and installing the binary JDK distributions offered by 'jabba'. You can install one, for example, with `nix-shell -p "jabba.adopt.\"1.13.0-2\""`.
Abandoning this PR, doing this out-of-tree in https://git.sr.ht/~raboof/nix-jabba |
Motivation for this change
As a developer it can sometimes be helpful to test/run code on a variety of different JDK variants and versions. Typically distributions ship only a few
variants/versions, and you'd rely on a tool like jabba or sdkman to install specific different ones. Now those tools are not very 'nix-like'.
This PR introduces a more 'nix-like' way of downloading and installing the binary JDK distributions offered by 'jabba'.
You can install one, for example, with
nix-shell -p "jabba.adopt.\"1.13.0-2\""
.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)