gtree: 1.10.2 -> 1.10.3
[NixPkgs.git] / pkgs / top-level / java-packages.nix
bloba4bafcc71dd15054f999a8151d69ce8cc5522a30
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 { };
13   mavenfod = pkgs.maven.buildMavenPackage;
15 in {
16   inherit mavenfod openjfx11 openjfx15 openjfx17 openjfx19 openjfx20 openjfx21;
18   compiler = let
20     gnomeArgs = {
21       inherit (gnome2) GConf gnome_vfs;
22     };
24     bootstrapArgs = gnomeArgs // {
25       openjfx = openjfx11; /* need this despite next line :-( */
26       enableJavaFX = false;
27       headless = true;
28     };
30     mkAdoptopenjdk = path-linux: path-darwin: let
31       package-linux  = import path-linux { inherit stdenv lib; };
32       package-darwin = import path-darwin { inherit lib; };
33       package = if stdenv.isLinux
34         then package-linux
35         else package-darwin;
36     in {
37       inherit package-linux package-darwin;
39       jdk-hotspot = callPackage package.jdk-hotspot {};
40       jre-hotspot = callPackage package.jre-hotspot {};
41       jdk-openj9  = callPackage package.jdk-openj9  {};
42       jre-openj9  = callPackage package.jre-openj9  {};
43     };
45     mkBootstrap = adoptopenjdk: path: args:
46       /* adoptopenjdk not available for i686, so fall back to our old builds for bootstrapping */
47       if   !stdenv.hostPlatform.isi686
48       then
49         # only linux has the gtkSupport option
50         if stdenv.isLinux
51         then adoptopenjdk.jdk-hotspot.override { gtkSupport = false; }
52         else adoptopenjdk.jdk-hotspot
53       else callPackage path args;
55     mkOpenjdk = path-linux: path-darwin: args:
56       if stdenv.isLinux
57       then mkOpenjdkLinuxOnly path-linux args
58       else let
59         openjdk = callPackage path-darwin {};
60       in openjdk // { headless = openjdk; };
62     mkOpenjdkLinuxOnly = path-linux: args: let
63       openjdk = callPackage path-linux  (gnomeArgs // args);
64     in openjdk // {
65       headless = openjdk.override { headless = true; };
66     };
68   in rec {
69     adoptopenjdk-8 = mkAdoptopenjdk
70       ../development/compilers/adoptopenjdk-bin/jdk8-linux.nix
71       ../development/compilers/adoptopenjdk-bin/jdk8-darwin.nix;
73     adoptopenjdk-11 = mkAdoptopenjdk
74       ../development/compilers/adoptopenjdk-bin/jdk11-linux.nix
75       ../development/compilers/adoptopenjdk-bin/jdk11-darwin.nix;
77     adoptopenjdk-13 = mkAdoptopenjdk
78       ../development/compilers/adoptopenjdk-bin/jdk13-linux.nix
79       ../development/compilers/adoptopenjdk-bin/jdk13-darwin.nix;
81     adoptopenjdk-14 = mkAdoptopenjdk
82       ../development/compilers/adoptopenjdk-bin/jdk14-linux.nix
83       ../development/compilers/adoptopenjdk-bin/jdk14-darwin.nix;
85     adoptopenjdk-15 = mkAdoptopenjdk
86       ../development/compilers/adoptopenjdk-bin/jdk15-linux.nix
87       ../development/compilers/adoptopenjdk-bin/jdk15-darwin.nix;
89     adoptopenjdk-16 = mkAdoptopenjdk
90       ../development/compilers/adoptopenjdk-bin/jdk16-linux.nix
91       ../development/compilers/adoptopenjdk-bin/jdk16-darwin.nix;
93     adoptopenjdk-17 = mkAdoptopenjdk
94       ../development/compilers/adoptopenjdk-bin/jdk17-linux.nix
95       ../development/compilers/adoptopenjdk-bin/jdk17-darwin.nix;
97     openjdk8-bootstrap = mkBootstrap adoptopenjdk-8
98       ../development/compilers/openjdk/bootstrap.nix
99       { version = "8"; };
101     openjdk11-bootstrap = mkBootstrap adoptopenjdk-11
102       ../development/compilers/openjdk/bootstrap.nix
103       { version = "10"; };
105     openjdk13-bootstrap = mkBootstrap adoptopenjdk-13
106       ../development/compilers/openjdk/12.nix
107       (bootstrapArgs // {
108         inherit openjdk11-bootstrap;
109         /* build segfaults with gcc9 or newer, so use gcc8 like Debian does */
110         stdenv = gcc8Stdenv;
111       });
113     openjdk14-bootstrap = mkBootstrap adoptopenjdk-14
114       ../development/compilers/openjdk/13.nix
115       (bootstrapArgs // {
116         inherit openjdk13-bootstrap;
117       });
119     openjdk15-bootstrap = mkBootstrap adoptopenjdk-15
120       ../development/compilers/openjdk/14.nix
121       (bootstrapArgs // {
122         inherit openjdk14-bootstrap;
123       });
125     openjdk16-bootstrap = mkBootstrap adoptopenjdk-16
126       ../development/compilers/openjdk/15.nix
127       (bootstrapArgs // {
128         inherit openjdk15-bootstrap;
129       });
131     openjdk17-bootstrap = mkBootstrap adoptopenjdk-17
132       ../development/compilers/openjdk/16.nix
133       (bootstrapArgs // {
134         inherit openjdk16-bootstrap;
135       });
137     openjdk18-bootstrap = mkBootstrap adoptopenjdk-17
138       ../development/compilers/openjdk/17.nix
139       (bootstrapArgs // {
140         inherit openjdk17-bootstrap;
141       });
143     openjdk8 = mkOpenjdk
144       ../development/compilers/openjdk/8.nix
145       ../development/compilers/zulu/8.nix
146       { };
148     openjdk11 = mkOpenjdk
149       ../development/compilers/openjdk/11.nix
150       ../development/compilers/zulu/11.nix
151       { openjfx = openjfx11; };
153     openjdk12 = mkOpenjdkLinuxOnly ../development/compilers/openjdk/12.nix {
154         /* build segfaults with gcc9 or newer, so use gcc8 like Debian does */
155         stdenv = gcc8Stdenv;
156         openjfx = openjfx11;
157     };
159     openjdk13 = mkOpenjdkLinuxOnly ../development/compilers/openjdk/13.nix {
160       inherit openjdk13-bootstrap;
161       openjfx = openjfx11;
162     };
164     openjdk14 = mkOpenjdkLinuxOnly ../development/compilers/openjdk/14.nix {
165       inherit openjdk14-bootstrap;
166       openjfx = openjfx11;
167     };
169     openjdk15 = mkOpenjdkLinuxOnly ../development/compilers/openjdk/15.nix {
170       inherit openjdk15-bootstrap;
171       openjfx = openjfx15;
172     };
174     openjdk16 = mkOpenjdk
175       ../development/compilers/openjdk/16.nix
176       ../development/compilers/zulu/16.nix
177       {
178         inherit openjdk16-bootstrap;
179         openjfx = openjfx15;
180       };
182     openjdk17 = mkOpenjdk
183       ../development/compilers/openjdk/17.nix
184       ../development/compilers/zulu/17.nix
185       {
186         inherit openjdk17-bootstrap;
187         openjfx = openjfx17;
188       };
190     openjdk18 = mkOpenjdk
191       ../development/compilers/openjdk/18.nix
192       ../development/compilers/zulu/18.nix
193       {
194         inherit openjdk18-bootstrap;
195         openjfx = openjfx17;
196       };
198     openjdk19 = mkOpenjdk
199       ../development/compilers/openjdk/19.nix
200       ../development/compilers/zulu/19.nix
201       {
202         openjdk19-bootstrap = temurin-bin.jdk-19;
203         openjfx = openjfx19;
204       };
206     openjdk20 = mkOpenjdk
207       ../development/compilers/openjdk/20.nix
208       ../development/compilers/zulu/20.nix
209       {
210         openjdk20-bootstrap = temurin-bin.jdk-20;
211         openjfx = openjfx20;
212       };
214     openjdk21 = mkOpenjdk
215       ../development/compilers/openjdk/21.nix
216       ../development/compilers/zulu/21.nix
217       {
218         openjdk21-bootstrap = temurin-bin.jdk-21;
219         openjfx = openjfx21;
220       };
222     temurin-bin = recurseIntoAttrs (callPackage (
223       if stdenv.isLinux
224       then ../development/compilers/temurin-bin/jdk-linux.nix
225       else ../development/compilers/temurin-bin/jdk-darwin.nix
226     ) {});
228     semeru-bin = recurseIntoAttrs (callPackage (
229       if stdenv.isLinux
230       then ../development/compilers/semeru-bin/jdk-linux.nix
231       else ../development/compilers/semeru-bin/jdk-darwin.nix
232     ) {});
233   };
235   inherit (pkgs.darwin.apple_sdk_11_0.callPackage ../development/java-modules/jogl { })
236     jogl_2_4_0;