rio: 0.0.36 -> 0.0.37
[NixPkgs.git] / pkgs / top-level / java-packages.nix
blob2d59c358863b2064bde74264f723c770bc33ff21
1 { pkgs }:
3 with pkgs;
5 let
6   openjfx11 = callPackage ../development/compilers/openjdk/openjfx/11.nix { };
7   openjfx15 = callPackage ../development/compilers/openjdk/openjfx/15.nix { };
8   openjfx17 = callPackage ../development/compilers/openjdk/openjfx/17.nix { };
9   openjfx19 = callPackage ../development/compilers/openjdk/openjfx/19.nix { };
10   openjfx20 = callPackage ../development/compilers/openjdk/openjfx/20.nix { };
11   openjfx21 = callPackage ../development/compilers/openjdk/openjfx/21.nix { };
12   openjfx22 = callPackage ../development/compilers/openjdk/openjfx/22.nix { };
14 in {
15   inherit openjfx11 openjfx15 openjfx17 openjfx19 openjfx20 openjfx21 openjfx22;
17   compiler = let
19     gnomeArgs = {
20       inherit (gnome2) GConf gnome_vfs;
21     };
23     bootstrapArgs = gnomeArgs // {
24       openjfx = openjfx11; /* need this despite next line :-( */
25       enableJavaFX = false;
26       headless = true;
27     };
29     mkAdoptopenjdk = path-linux: path-darwin: let
30       package-linux  = import path-linux { inherit stdenv lib; };
31       package-darwin = import path-darwin { inherit lib; };
32       package = if stdenv.isLinux
33         then package-linux
34         else package-darwin;
35     in {
36       inherit package-linux package-darwin;
37       __attrsFailEvaluation = true;
39       jdk-hotspot = callPackage package.jdk-hotspot {};
40       jre-hotspot = callPackage package.jre-hotspot {};
41     } // lib.optionalAttrs (package?jdk-openj9) {
42       jdk-openj9  = callPackage package.jdk-openj9  {};
43     } // lib.optionalAttrs (package?jre-openj9) {
44       jre-openj9  = callPackage package.jre-openj9  {};
45     };
47     mkBootstrap = adoptopenjdk: path: args:
48       /* adoptopenjdk not available for i686, so fall back to our old builds for bootstrapping */
49       if   !stdenv.hostPlatform.isi686
50       then
51         # only linux has the gtkSupport option
52         if stdenv.isLinux
53         then adoptopenjdk.jdk-hotspot.override { gtkSupport = false; }
54         else adoptopenjdk.jdk-hotspot
55       else callPackage path args;
57     mkOpenjdk = path-linux: path-darwin: args:
58       if stdenv.isLinux
59       then mkOpenjdkLinuxOnly path-linux args
60       else let
61         openjdk = callPackage path-darwin {};
62       in openjdk // { headless = openjdk; };
64     mkOpenjdkLinuxOnly = path-linux: args: let
65       openjdk = callPackage path-linux  (gnomeArgs // args);
66     in assert stdenv.isLinux; openjdk // {
67       headless = openjdk.override { headless = true; };
68     };
70   in rec {
71     adoptopenjdk-8 = mkAdoptopenjdk
72       ../development/compilers/adoptopenjdk-bin/jdk8-linux.nix
73       ../development/compilers/adoptopenjdk-bin/jdk8-darwin.nix;
75     adoptopenjdk-11 = mkAdoptopenjdk
76       ../development/compilers/adoptopenjdk-bin/jdk11-linux.nix
77       ../development/compilers/adoptopenjdk-bin/jdk11-darwin.nix;
79     adoptopenjdk-13 = mkAdoptopenjdk
80       ../development/compilers/adoptopenjdk-bin/jdk13-linux.nix
81       ../development/compilers/adoptopenjdk-bin/jdk13-darwin.nix;
83     adoptopenjdk-14 = mkAdoptopenjdk
84       ../development/compilers/adoptopenjdk-bin/jdk14-linux.nix
85       ../development/compilers/adoptopenjdk-bin/jdk14-darwin.nix;
87     adoptopenjdk-15 = mkAdoptopenjdk
88       ../development/compilers/adoptopenjdk-bin/jdk15-linux.nix
89       ../development/compilers/adoptopenjdk-bin/jdk15-darwin.nix;
91     adoptopenjdk-16 = mkAdoptopenjdk
92       ../development/compilers/adoptopenjdk-bin/jdk16-linux.nix
93       ../development/compilers/adoptopenjdk-bin/jdk16-darwin.nix;
95     adoptopenjdk-17 = mkAdoptopenjdk
96       ../development/compilers/adoptopenjdk-bin/jdk17-linux.nix
97       ../development/compilers/adoptopenjdk-bin/jdk17-darwin.nix;
99     corretto11 = callPackage ../development/compilers/corretto/11.nix { };
100     corretto17 = callPackage ../development/compilers/corretto/17.nix { };
101     corretto19 = callPackage ../development/compilers/corretto/19.nix { };
102     corretto21 = callPackage ../development/compilers/corretto/21.nix { };
104     openjdk8-bootstrap = mkBootstrap adoptopenjdk-8
105       ../development/compilers/openjdk/bootstrap.nix
106       { version = "8"; };
108     openjdk11-bootstrap = mkBootstrap adoptopenjdk-11
109       ../development/compilers/openjdk/bootstrap.nix
110       { version = "10"; };
112     openjdk13-bootstrap = mkBootstrap adoptopenjdk-13
113       ../development/compilers/openjdk/12.nix
114       (bootstrapArgs // {
115         inherit openjdk11-bootstrap;
116         /* build segfaults with gcc9 or newer, so use gcc8 like Debian does */
117         stdenv = gcc8Stdenv;
118       });
120     openjdk14-bootstrap = mkBootstrap adoptopenjdk-14
121       ../development/compilers/openjdk/13.nix
122       (bootstrapArgs // {
123         inherit openjdk13-bootstrap;
124       });
126     openjdk15-bootstrap = mkBootstrap adoptopenjdk-15
127       ../development/compilers/openjdk/14.nix
128       (bootstrapArgs // {
129         inherit openjdk14-bootstrap;
130       });
132     openjdk16-bootstrap = mkBootstrap adoptopenjdk-16
133       ../development/compilers/openjdk/15.nix
134       (bootstrapArgs // {
135         inherit openjdk15-bootstrap;
136       });
138     openjdk17-bootstrap = mkBootstrap adoptopenjdk-17
139       ../development/compilers/openjdk/16.nix
140       (bootstrapArgs // {
141         inherit openjdk16-bootstrap;
142       });
144     openjdk18-bootstrap = mkBootstrap adoptopenjdk-17
145       ../development/compilers/openjdk/17.nix
146       (bootstrapArgs // {
147         inherit openjdk17-bootstrap;
148       });
150     openjdk8 = mkOpenjdk
151       ../development/compilers/openjdk/8.nix
152       ../development/compilers/zulu/8.nix
153       { };
155     openjdk11 = mkOpenjdk
156       ../development/compilers/openjdk/11.nix
157       ../development/compilers/zulu/11.nix
158       { openjfx = openjfx11; };
160     openjdk12 = mkOpenjdkLinuxOnly ../development/compilers/openjdk/12.nix {
161         /* build segfaults with gcc9 or newer, so use gcc8 like Debian does */
162         stdenv = gcc8Stdenv;
163         openjfx = openjfx11;
164     };
166     openjdk13 = mkOpenjdkLinuxOnly ../development/compilers/openjdk/13.nix {
167       inherit openjdk13-bootstrap;
168       openjfx = openjfx11;
169     };
171     openjdk14 = mkOpenjdkLinuxOnly ../development/compilers/openjdk/14.nix {
172       inherit openjdk14-bootstrap;
173       openjfx = openjfx11;
174     };
176     openjdk15 = mkOpenjdkLinuxOnly ../development/compilers/openjdk/15.nix {
177       inherit openjdk15-bootstrap;
178       openjfx = openjfx15;
179     };
181     openjdk16 = mkOpenjdkLinuxOnly ../development/compilers/openjdk/16.nix {
182       inherit openjdk16-bootstrap;
183       openjfx = openjfx15;
184     };
186     openjdk17 = mkOpenjdk
187       ../development/compilers/openjdk/17.nix
188       ../development/compilers/zulu/17.nix
189       {
190         inherit openjdk17-bootstrap;
191         openjfx = openjfx17;
192       };
194     openjdk18 = mkOpenjdk
195       ../development/compilers/openjdk/18.nix
196       ../development/compilers/zulu/18.nix
197       {
198         inherit openjdk18-bootstrap;
199         openjfx = openjfx17;
200       };
202     openjdk19 = mkOpenjdk
203       ../development/compilers/openjdk/19.nix
204       ../development/compilers/zulu/19.nix
205       {
206         openjdk19-bootstrap = temurin-bin.jdk-19;
207         openjfx = openjfx19;
208       };
210     openjdk20 = mkOpenjdk
211       ../development/compilers/openjdk/20.nix
212       ../development/compilers/zulu/20.nix
213       {
214         openjdk20-bootstrap = temurin-bin.jdk-20;
215         openjfx = openjfx20;
216       };
218     openjdk21 = mkOpenjdk
219       ../development/compilers/openjdk/21.nix
220       ../development/compilers/zulu/21.nix
221       {
222         openjdk21-bootstrap = temurin-bin.jdk-21;
223         openjfx = openjfx21;
224       };
226     openjdk22 = mkOpenjdk
227       ../development/compilers/openjdk/22.nix
228       ../development/compilers/zulu/22.nix
229       {
230         openjdk22-bootstrap = temurin-bin.jdk-21;
231         openjfx = openjfx22;
232       };
234     temurin-bin = recurseIntoAttrs (callPackage (
235       if stdenv.isLinux
236       then ../development/compilers/temurin-bin/jdk-linux.nix
237       else ../development/compilers/temurin-bin/jdk-darwin.nix
238     ) {});
240     semeru-bin = recurseIntoAttrs (callPackage (
241       if stdenv.isLinux
242       then ../development/compilers/semeru-bin/jdk-linux.nix
243       else ../development/compilers/semeru-bin/jdk-darwin.nix
244     ) {});
245   };
247 // lib.optionalAttrs config.allowAliases {
248   jogl_2_4_0 = throw "'jogl_2_4_0' is renamed to/replaced by 'jogl'";
249   mavenfod = throw "'mavenfod' is renamed to/replaced by 'maven.buildMavenPackage'";