Skip to content

Commit b9ff558

Browse files
committed
flake.nix: Add jdk25 to default devShell
Add jdk25 to the default devShell, but continue to keep graalvm-ce available via GRAALVM_HOME and via javaToolchains. In the minimum devShell continue using graalvm-ce as the only JDK.
1 parent bc56ac1 commit b9ff558

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

flake.nix

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
pkgs = import nixpkgs {
2020
inherit system;
2121
};
22+
jdk = pkgs.jdk25;
2223
graalvm = pkgs.graalvmPackages.graalvm-ce;
2324
sharedShellHook = ''
2425
if [[ "$(uname)" == "Darwin" ]]; then
@@ -35,11 +36,14 @@
3536
default = pkgs.mkShell {
3637
buildInputs = with pkgs ; [ secp256k1 zlib ];
3738
packages = with pkgs ; [
38-
graalvm # This JDK will be in PATH
39+
jdk # This JDK will be in PATH
3940
# current jextract in nixpkgs is broken, see: https://github.com/NixOS/nixpkgs/issues/354591
4041
# jextract # jextract (Nix package) contains a jlinked executable and bundles its own JDK
4142
(gradle_9.override { # Gradle (Nix package) runs using an internally-linked JDK
42-
java = graalvm; # Run Gradle with this JDK
43+
java = jdk; # Run Gradle with this JDK
44+
javaToolchains = [ # Make these JDKs available via the Gradle javaToolchains feature
45+
graalvm
46+
];
4347
})
4448
];
4549
shellHook = sharedShellHook;

0 commit comments

Comments
 (0)