exploitdb: 2024-10-02 -> 2024-11-16 (#356407)
[NixPkgs.git] / pkgs / top-level / java-packages.nix
blob020d505d98252bfb90becd1966d6a295d121f146
1 { pkgs }:
3 with pkgs;
6   inherit (pkgs) openjfx17 openjfx21 openjfx23;
8   compiler = let
9     mkOpenjdk = featureVersion: path-darwin:
10       if stdenv.hostPlatform.isLinux
11       then mkOpenjdkLinuxOnly featureVersion
12       else let
13         openjdk = callPackage path-darwin {};
14       in openjdk // { headless = openjdk; };
16     mkOpenjdkLinuxOnly = featureVersion: let
17       openjdk = callPackage ../development/compilers/openjdk/generic.nix { inherit featureVersion; };
18     in assert stdenv.hostPlatform.isLinux; openjdk // {
19       headless = openjdk.override { headless = true; };
20     };
22   in rec {
23     corretto11 = callPackage ../development/compilers/corretto/11.nix { };
24     corretto17 = callPackage ../development/compilers/corretto/17.nix { };
25     corretto21 = callPackage ../development/compilers/corretto/21.nix { };
27     openjdk8 = mkOpenjdk "8" ../development/compilers/zulu/8.nix;
28     openjdk11 = mkOpenjdk "11" ../development/compilers/zulu/11.nix;
29     openjdk17 = mkOpenjdk "17" ../development/compilers/zulu/17.nix;
30     openjdk21 = mkOpenjdk "21" ../development/compilers/zulu/21.nix;
31     openjdk23 = mkOpenjdk "23" ../development/compilers/zulu/23.nix;
33     # Legacy aliases
34     openjdk8-bootstrap = temurin-bin.jdk-8;
35     openjdk11-bootstrap = temurin-bin.jdk-11;
36     openjdk17-bootstrap = temurin-bin.jdk-17;
38     temurin-bin = recurseIntoAttrs (callPackage (
39       if stdenv.hostPlatform.isLinux
40       then ../development/compilers/temurin-bin/jdk-linux.nix
41       else ../development/compilers/temurin-bin/jdk-darwin.nix
42     ) {});
44     semeru-bin = recurseIntoAttrs (callPackage (
45       if stdenv.hostPlatform.isLinux
46       then ../development/compilers/semeru-bin/jdk-linux.nix
47       else ../development/compilers/semeru-bin/jdk-darwin.nix
48     ) {});
49   };
51 // lib.optionalAttrs config.allowAliases {
52   jogl_2_4_0 = throw "'jogl_2_4_0' is renamed to/replaced by 'jogl'";
53   mavenfod = throw "'mavenfod' is renamed to/replaced by 'maven.buildMavenPackage'";