about summary refs log tree commit diff
path: root/pkgs/top-level/java-packages.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/top-level/java-packages.nix')
-rw-r--r--pkgs/top-level/java-packages.nix69
1 files changed, 17 insertions, 52 deletions
diff --git a/pkgs/top-level/java-packages.nix b/pkgs/top-level/java-packages.nix
index 82022f25613b..020d505d9825 100644
--- a/pkgs/top-level/java-packages.nix
+++ b/pkgs/top-level/java-packages.nix
@@ -2,26 +2,20 @@
 
 with pkgs;
 
-let
-  openjfx11 = callPackage ../development/compilers/openjdk/openjfx/11 { };
-  openjfx17 = callPackage ../development/compilers/openjdk/openjfx/17 { };
-  openjfx21 = callPackage ../development/compilers/openjdk/openjfx/21 { };
-  openjfx22 = callPackage ../development/compilers/openjdk/openjfx/22 { };
-
-in {
-  inherit openjfx11 openjfx17 openjfx21 openjfx22;
+{
+  inherit (pkgs) openjfx17 openjfx21 openjfx23;
 
   compiler = let
-    mkOpenjdk = path-linux: path-darwin: args:
-      if stdenv.isLinux
-      then mkOpenjdkLinuxOnly path-linux args
+    mkOpenjdk = featureVersion: path-darwin:
+      if stdenv.hostPlatform.isLinux
+      then mkOpenjdkLinuxOnly featureVersion
       else let
         openjdk = callPackage path-darwin {};
       in openjdk // { headless = openjdk; };
 
-    mkOpenjdkLinuxOnly = path-linux: args: let
-      openjdk = callPackage path-linux (args);
-    in assert stdenv.isLinux; openjdk // {
+    mkOpenjdkLinuxOnly = featureVersion: let
+      openjdk = callPackage ../development/compilers/openjdk/generic.nix { inherit featureVersion; };
+    in assert stdenv.hostPlatform.isLinux; openjdk // {
       headless = openjdk.override { headless = true; };
     };
 
@@ -30,54 +24,25 @@ in {
     corretto17 = callPackage ../development/compilers/corretto/17.nix { };
     corretto21 = callPackage ../development/compilers/corretto/21.nix { };
 
-    openjdk8-bootstrap = temurin-bin.jdk-8;
+    openjdk8 = mkOpenjdk "8" ../development/compilers/zulu/8.nix;
+    openjdk11 = mkOpenjdk "11" ../development/compilers/zulu/11.nix;
+    openjdk17 = mkOpenjdk "17" ../development/compilers/zulu/17.nix;
+    openjdk21 = mkOpenjdk "21" ../development/compilers/zulu/21.nix;
+    openjdk23 = mkOpenjdk "23" ../development/compilers/zulu/23.nix;
 
+    # Legacy aliases
+    openjdk8-bootstrap = temurin-bin.jdk-8;
     openjdk11-bootstrap = temurin-bin.jdk-11;
-
     openjdk17-bootstrap = temurin-bin.jdk-17;
 
-    openjdk8 = mkOpenjdk
-      ../development/compilers/openjdk/8.nix
-      ../development/compilers/zulu/8.nix
-      { };
-
-    openjdk11 = mkOpenjdk
-      ../development/compilers/openjdk/11.nix
-      ../development/compilers/zulu/11.nix
-      { openjfx = openjfx11; };
-
-    openjdk17 = mkOpenjdk
-      ../development/compilers/openjdk/17.nix
-      ../development/compilers/zulu/17.nix
-      {
-        inherit openjdk17-bootstrap;
-        openjfx = openjfx17;
-      };
-
-    openjdk21 = mkOpenjdk
-      ../development/compilers/openjdk/21.nix
-      ../development/compilers/zulu/21.nix
-      {
-        openjdk21-bootstrap = temurin-bin.jdk-21;
-        openjfx = openjfx21;
-      };
-
-    openjdk22 = mkOpenjdk
-      ../development/compilers/openjdk/22.nix
-      ../development/compilers/zulu/22.nix
-      {
-        openjdk22-bootstrap = temurin-bin.jdk-22;
-        openjfx = openjfx22;
-      };
-
     temurin-bin = recurseIntoAttrs (callPackage (
-      if stdenv.isLinux
+      if stdenv.hostPlatform.isLinux
       then ../development/compilers/temurin-bin/jdk-linux.nix
       else ../development/compilers/temurin-bin/jdk-darwin.nix
     ) {});
 
     semeru-bin = recurseIntoAttrs (callPackage (
-      if stdenv.isLinux
+      if stdenv.hostPlatform.isLinux
       then ../development/compilers/semeru-bin/jdk-linux.nix
       else ../development/compilers/semeru-bin/jdk-darwin.nix
     ) {});