2024-05-02 00:46:19 +00:00
|
|
|
{ pkgs }:
|
|
|
|
|
|
|
|
with pkgs;
|
|
|
|
|
|
|
|
let
|
|
|
|
openjfx11 = callPackage ./openjdk/openjfx/11.nix { };
|
|
|
|
openjfx15 = callPackage ./openjdk/openjfx/15.nix { };
|
|
|
|
openjfx17 = callPackage ./openjdk/openjfx/17.nix { };
|
|
|
|
openjfx19 = callPackage ./openjdk/openjfx/19.nix { };
|
|
|
|
openjfx20 = callPackage ./openjdk/openjfx/20.nix { };
|
|
|
|
openjfx21 = callPackage ./openjdk/openjfx/21.nix { };
|
|
|
|
openjfx22 = callPackage ./openjdk/openjfx/22.nix { };
|
|
|
|
|
|
|
|
in {
|
|
|
|
inherit openjfx11 openjfx15 openjfx17 openjfx19 openjfx20 openjfx21 openjfx22;
|
|
|
|
|
|
|
|
compiler = let
|
|
|
|
|
2024-05-13 21:24:10 +00:00
|
|
|
gnomeArgs = { inherit (gnome2) GConf gnome_vfs; };
|
2024-05-02 00:46:19 +00:00
|
|
|
|
|
|
|
bootstrapArgs = gnomeArgs // {
|
2024-05-13 21:24:10 +00:00
|
|
|
openjfx = openjfx11; # need this despite next line :-(
|
2024-05-02 00:46:19 +00:00
|
|
|
enableJavaFX = false;
|
|
|
|
headless = true;
|
|
|
|
};
|
|
|
|
|
2024-05-13 21:24:10 +00:00
|
|
|
mkAdoptopenjdk = path-linux: path-darwin:
|
|
|
|
let
|
|
|
|
package-linux = import path-linux { inherit stdenv lib; };
|
|
|
|
package-darwin = import path-darwin { inherit lib; };
|
|
|
|
package = if stdenv.isLinux then package-linux else package-darwin;
|
|
|
|
in {
|
|
|
|
inherit package-linux package-darwin;
|
|
|
|
__attrsFailEvaluation = true;
|
|
|
|
|
|
|
|
jdk-hotspot = callPackage package.jdk-hotspot { };
|
|
|
|
jre-hotspot = callPackage package.jre-hotspot { };
|
|
|
|
} // lib.optionalAttrs (package ? jdk-openj9) {
|
|
|
|
jdk-openj9 = callPackage package.jdk-openj9 { };
|
|
|
|
} // lib.optionalAttrs (package ? jre-openj9) {
|
|
|
|
jre-openj9 = callPackage package.jre-openj9 { };
|
|
|
|
};
|
2024-05-02 00:46:19 +00:00
|
|
|
|
|
|
|
mkBootstrap = adoptopenjdk: path: args:
|
2024-05-13 21:24:10 +00:00
|
|
|
# adoptopenjdk not available for i686, so fall back to our old builds for bootstrapping
|
|
|
|
if !stdenv.hostPlatform.isi686 then
|
|
|
|
# only linux has the gtkSupport option
|
|
|
|
if stdenv.isLinux then
|
|
|
|
adoptopenjdk.jdk-hotspot.override { gtkSupport = false; }
|
|
|
|
else
|
|
|
|
adoptopenjdk.jdk-hotspot
|
|
|
|
else
|
|
|
|
callPackage path args;
|
2024-05-02 00:46:19 +00:00
|
|
|
|
|
|
|
mkOpenjdk = path-linux: path-darwin: args:
|
2024-05-13 21:24:10 +00:00
|
|
|
if stdenv.isLinux then
|
|
|
|
mkOpenjdkLinuxOnly path-linux args
|
|
|
|
else
|
|
|
|
let openjdk = callPackage path-darwin { };
|
|
|
|
in openjdk // { headless = openjdk; };
|
|
|
|
|
|
|
|
mkOpenjdkLinuxOnly = path-linux: args:
|
|
|
|
let openjdk = callPackage path-linux (gnomeArgs // args);
|
|
|
|
in assert stdenv.isLinux;
|
|
|
|
openjdk // {
|
|
|
|
headless = openjdk.override { headless = true; };
|
|
|
|
};
|
2024-05-02 00:46:19 +00:00
|
|
|
|
|
|
|
in rec {
|
2024-05-13 21:24:10 +00:00
|
|
|
adoptopenjdk-8 = mkAdoptopenjdk ./adoptopenjdk-bin/jdk8-linux.nix
|
2024-05-02 00:46:19 +00:00
|
|
|
./adoptopenjdk-bin/jdk8-darwin.nix;
|
|
|
|
|
2024-05-13 21:24:10 +00:00
|
|
|
adoptopenjdk-11 = mkAdoptopenjdk ./adoptopenjdk-bin/jdk11-linux.nix
|
2024-05-02 00:46:19 +00:00
|
|
|
./adoptopenjdk-bin/jdk11-darwin.nix;
|
|
|
|
|
2024-05-13 21:24:10 +00:00
|
|
|
adoptopenjdk-13 = mkAdoptopenjdk ./adoptopenjdk-bin/jdk13-linux.nix
|
2024-05-02 00:46:19 +00:00
|
|
|
./adoptopenjdk-bin/jdk13-darwin.nix;
|
|
|
|
|
2024-05-13 21:24:10 +00:00
|
|
|
adoptopenjdk-14 = mkAdoptopenjdk ./adoptopenjdk-bin/jdk14-linux.nix
|
2024-05-02 00:46:19 +00:00
|
|
|
./adoptopenjdk-bin/jdk14-darwin.nix;
|
|
|
|
|
2024-05-13 21:24:10 +00:00
|
|
|
adoptopenjdk-15 = mkAdoptopenjdk ./adoptopenjdk-bin/jdk15-linux.nix
|
2024-05-02 00:46:19 +00:00
|
|
|
./adoptopenjdk-bin/jdk15-darwin.nix;
|
|
|
|
|
2024-05-13 21:24:10 +00:00
|
|
|
adoptopenjdk-16 = mkAdoptopenjdk ./adoptopenjdk-bin/jdk16-linux.nix
|
2024-05-02 00:46:19 +00:00
|
|
|
./adoptopenjdk-bin/jdk16-darwin.nix;
|
|
|
|
|
2024-05-13 21:24:10 +00:00
|
|
|
adoptopenjdk-17 = mkAdoptopenjdk ./adoptopenjdk-bin/jdk17-linux.nix
|
2024-05-02 00:46:19 +00:00
|
|
|
./adoptopenjdk-bin/jdk17-darwin.nix;
|
|
|
|
|
|
|
|
corretto11 = callPackage ./corretto/11.nix { };
|
|
|
|
corretto17 = callPackage ./corretto/17.nix { };
|
|
|
|
corretto19 = callPackage ./corretto/19.nix { };
|
|
|
|
corretto21 = callPackage ./corretto/21.nix { };
|
|
|
|
|
2024-05-13 21:24:10 +00:00
|
|
|
openjdk8-bootstrap =
|
|
|
|
mkBootstrap adoptopenjdk-8 ./openjdk/bootstrap.nix { version = "8"; };
|
2024-05-02 00:46:19 +00:00
|
|
|
|
2024-05-13 21:24:10 +00:00
|
|
|
openjdk11-bootstrap =
|
|
|
|
mkBootstrap adoptopenjdk-11 ./openjdk/bootstrap.nix { version = "10"; };
|
2024-05-02 00:46:19 +00:00
|
|
|
|
2024-05-13 21:24:10 +00:00
|
|
|
openjdk13-bootstrap = mkBootstrap adoptopenjdk-13 ./openjdk/12.nix
|
2024-05-02 00:46:19 +00:00
|
|
|
(bootstrapArgs // {
|
|
|
|
inherit openjdk11-bootstrap;
|
2024-05-13 21:24:10 +00:00
|
|
|
# build segfaults with gcc9 or newer, so use gcc8 like Debian does
|
2024-05-02 00:46:19 +00:00
|
|
|
stdenv = gcc8Stdenv;
|
|
|
|
});
|
|
|
|
|
2024-05-13 21:24:10 +00:00
|
|
|
openjdk14-bootstrap = mkBootstrap adoptopenjdk-14 ./openjdk/13.nix
|
|
|
|
(bootstrapArgs // { inherit openjdk13-bootstrap; });
|
2024-05-02 00:46:19 +00:00
|
|
|
|
2024-05-13 21:24:10 +00:00
|
|
|
openjdk15-bootstrap = mkBootstrap adoptopenjdk-15 ./openjdk/14.nix
|
|
|
|
(bootstrapArgs // { inherit openjdk14-bootstrap; });
|
2024-05-02 00:46:19 +00:00
|
|
|
|
2024-05-13 21:24:10 +00:00
|
|
|
openjdk16-bootstrap = mkBootstrap adoptopenjdk-16 ./openjdk/15.nix
|
|
|
|
(bootstrapArgs // { inherit openjdk15-bootstrap; });
|
2024-05-02 00:46:19 +00:00
|
|
|
|
2024-05-13 21:24:10 +00:00
|
|
|
openjdk17-bootstrap = mkBootstrap adoptopenjdk-17 ./openjdk/16.nix
|
|
|
|
(bootstrapArgs // { inherit openjdk16-bootstrap; });
|
2024-05-02 00:46:19 +00:00
|
|
|
|
2024-05-13 21:24:10 +00:00
|
|
|
openjdk18-bootstrap = mkBootstrap adoptopenjdk-17 ./openjdk/17.nix
|
|
|
|
(bootstrapArgs // { inherit openjdk17-bootstrap; });
|
2024-05-02 00:46:19 +00:00
|
|
|
|
2024-05-13 21:24:10 +00:00
|
|
|
openjdk8 = mkOpenjdk ./openjdk/8.nix ./zulu/8.nix { };
|
2024-05-02 00:46:19 +00:00
|
|
|
|
2024-05-13 21:24:10 +00:00
|
|
|
openjdk11 =
|
|
|
|
mkOpenjdk ./openjdk/11.nix ./zulu/11.nix { openjfx = openjfx11; };
|
2024-05-02 00:46:19 +00:00
|
|
|
|
|
|
|
openjdk12 = mkOpenjdkLinuxOnly ./openjdk/12.nix {
|
2024-05-13 21:24:10 +00:00
|
|
|
# build segfaults with gcc9 or newer, so use gcc8 like Debian does
|
|
|
|
stdenv = gcc8Stdenv;
|
|
|
|
openjfx = openjfx11;
|
2024-05-02 00:46:19 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
openjdk13 = mkOpenjdkLinuxOnly ./openjdk/13.nix {
|
|
|
|
inherit openjdk13-bootstrap;
|
|
|
|
openjfx = openjfx11;
|
|
|
|
};
|
|
|
|
|
|
|
|
openjdk14 = mkOpenjdkLinuxOnly ./openjdk/14.nix {
|
|
|
|
inherit openjdk14-bootstrap;
|
|
|
|
openjfx = openjfx11;
|
|
|
|
};
|
|
|
|
|
|
|
|
openjdk15 = mkOpenjdkLinuxOnly ./openjdk/15.nix {
|
|
|
|
inherit openjdk15-bootstrap;
|
|
|
|
openjfx = openjfx15;
|
|
|
|
};
|
|
|
|
|
|
|
|
openjdk16 = mkOpenjdkLinuxOnly ./openjdk/16.nix {
|
|
|
|
inherit openjdk16-bootstrap;
|
|
|
|
openjfx = openjfx15;
|
|
|
|
};
|
|
|
|
|
2024-05-13 21:24:10 +00:00
|
|
|
openjdk17 = mkOpenjdk ./openjdk/17.nix ./zulu/17.nix {
|
|
|
|
inherit openjdk17-bootstrap;
|
|
|
|
openjfx = openjfx17;
|
|
|
|
};
|
2024-05-02 00:46:19 +00:00
|
|
|
|
2024-05-13 21:24:10 +00:00
|
|
|
openjdk18 = mkOpenjdk ./openjdk/18.nix ./zulu/18.nix {
|
|
|
|
inherit openjdk18-bootstrap;
|
|
|
|
openjfx = openjfx17;
|
|
|
|
};
|
2024-05-02 00:46:19 +00:00
|
|
|
|
2024-05-13 21:24:10 +00:00
|
|
|
openjdk19 = mkOpenjdk ./openjdk/19.nix ./zulu/19.nix {
|
|
|
|
openjdk19-bootstrap = temurin-bin.jdk-19;
|
|
|
|
openjfx = openjfx19;
|
|
|
|
};
|
2024-05-02 00:46:19 +00:00
|
|
|
|
2024-05-13 21:24:10 +00:00
|
|
|
openjdk20 = mkOpenjdk ./openjdk/20.nix ./zulu/20.nix {
|
|
|
|
openjdk20-bootstrap = temurin-bin.jdk-20;
|
|
|
|
openjfx = openjfx20;
|
|
|
|
};
|
2024-05-02 00:46:19 +00:00
|
|
|
|
2024-05-13 21:24:10 +00:00
|
|
|
openjdk21 = mkOpenjdk ./openjdk/21.nix ./zulu/21.nix {
|
|
|
|
openjdk21-bootstrap = temurin-bin.jdk-21;
|
|
|
|
openjfx = openjfx21;
|
|
|
|
};
|
2024-05-02 00:46:19 +00:00
|
|
|
|
2024-05-13 21:24:10 +00:00
|
|
|
openjdk22 = mkOpenjdk ./openjdk/22.nix ./zulu/22.nix {
|
|
|
|
openjdk22-bootstrap = temurin-bin.jdk-21;
|
|
|
|
openjfx = openjfx22;
|
|
|
|
};
|
|
|
|
|
|
|
|
temurin-bin = recurseIntoAttrs (callPackage (if stdenv.isLinux then
|
|
|
|
./temurin-bin/jdk-linux.nix
|
|
|
|
else
|
|
|
|
./temurin-bin/jdk-darwin.nix) { });
|
2024-05-02 00:46:19 +00:00
|
|
|
|
2024-05-13 21:24:10 +00:00
|
|
|
semeru-bin = recurseIntoAttrs (callPackage (if stdenv.isLinux then
|
|
|
|
./semeru-bin/jdk-linux.nix
|
|
|
|
else
|
|
|
|
./semeru-bin/jdk-darwin.nix) { });
|
2024-05-02 00:46:19 +00:00
|
|
|
};
|
2024-05-13 21:24:10 +00:00
|
|
|
} // lib.optionalAttrs config.allowAliases {
|
2024-05-02 00:46:19 +00:00
|
|
|
jogl_2_4_0 = throw "'jogl_2_4_0' is renamed to/replaced by 'jogl'";
|
2024-05-13 21:24:10 +00:00
|
|
|
mavenfod =
|
|
|
|
throw "'mavenfod' is renamed to/replaced by 'maven.buildMavenPackage'";
|
2024-05-02 00:46:19 +00:00
|
|
|
}
|