Skip to content

Commit 813c27d

Browse files
committed
flake.nix: create jdk and jdk-headless variables
These will help us keep track of where we are temporarily using graalvm instead of openjdk.
1 parent f2d14e9 commit 813c27d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

flake.nix

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
config.allowUnfreePredicate = pkg:
2323
builtins.elem (pkgs.lib.getName pkg) allowedUnfree;
2424
};
25+
jdk = pkgs.jdk24;
26+
jdk-headless = pkgs.jdk24_headless;
2527
graalvm = pkgs.graalvmPackages.graalvm-oracle_25-ea;
2628
sharedShellHook = ''
2729
if [[ "$(uname)" == "Darwin" ]]; then
@@ -42,7 +44,7 @@
4244
# current jextract in nixpkgs is broken, see: https://github.com/NixOS/nixpkgs/issues/354591
4345
# jextract # jextract (Nix package) contains a jlinked executable and bundles its own JDK
4446
(gradle_9.override { # Gradle (Nix package) runs using an internally-linked JDK
45-
java = jdk24; # Run Gradle with this JDK
47+
java = jdk; # Run Gradle with this JDK
4648
})
4749
];
4850
shellHook = sharedShellHook;
@@ -53,7 +55,7 @@
5355
packages = with pkgs ; [
5456
graalvm # This JDK will be in PATH
5557
(gradle_9.override { # Gradle (Nix package) runs using an internally-linked JDK
56-
java = jdk24_headless; # Run Gradle with this JDK
58+
java = jdk-headless; # Run Gradle with this JDK
5759
})
5860
];
5961
shellHook = sharedShellHook;

0 commit comments

Comments
 (0)