mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-09-19 14:20:19 +00:00
openjdk: generalize platforms for zulu builds
This commit is contained in:
@@ -4,11 +4,10 @@
|
||||
}@args:
|
||||
|
||||
callPackage ./common.nix ({
|
||||
# Details from https://www.azul.com/downloads/?version=java-11-lts&os=macos&package=jdk
|
||||
# Details from https://www.azul.com/downloads/?version=java-11-lts&package=jdk
|
||||
# Note that the latest build may differ by platform
|
||||
dists = {
|
||||
x86_64-darwin = {
|
||||
arch = "x64";
|
||||
zuluVersion = "11.66.15";
|
||||
jdkVersion = "11.0.20";
|
||||
hash =
|
||||
@@ -17,7 +16,6 @@ callPackage ./common.nix ({
|
||||
};
|
||||
|
||||
aarch64-darwin = {
|
||||
arch = "aarch64";
|
||||
zuluVersion = "11.66.15";
|
||||
jdkVersion = "11.0.20";
|
||||
hash =
|
||||
|
||||
@@ -4,11 +4,10 @@
|
||||
}@args:
|
||||
|
||||
callPackage ./common.nix ({
|
||||
# Details from https://www.azul.com/downloads/?version=java-16-sts&os=macos&package=jdk
|
||||
# Details from https://www.azul.com/downloads/?version=java-16-sts&package=jdk
|
||||
# Note that the latest build may differ by platform
|
||||
dists = {
|
||||
x86_64-darwin = {
|
||||
arch = "x64";
|
||||
zuluVersion = "16.32.15";
|
||||
jdkVersion = "16.0.2";
|
||||
hash =
|
||||
@@ -17,7 +16,6 @@ callPackage ./common.nix ({
|
||||
};
|
||||
|
||||
aarch64-darwin = {
|
||||
arch = "aarch64";
|
||||
zuluVersion = "16.32.15";
|
||||
jdkVersion = "16.0.2";
|
||||
hash =
|
||||
|
||||
@@ -4,11 +4,10 @@
|
||||
}@args:
|
||||
|
||||
callPackage ./common.nix ({
|
||||
# Details from https://www.azul.com/downloads/?version=java-17-lts&os=macos&package=jdk
|
||||
# Details from https://www.azul.com/downloads/?version=java-17-lts&package=jdk
|
||||
# Note that the latest build may differ by platform
|
||||
dists = {
|
||||
x86_64-darwin = {
|
||||
arch = "x64";
|
||||
zuluVersion = "17.44.53";
|
||||
jdkVersion = "17.0.8.1";
|
||||
hash =
|
||||
@@ -17,7 +16,6 @@ callPackage ./common.nix ({
|
||||
};
|
||||
|
||||
aarch64-darwin = {
|
||||
arch = "aarch64";
|
||||
zuluVersion = "17.44.53";
|
||||
jdkVersion = "17.0.8.1";
|
||||
hash =
|
||||
|
||||
@@ -4,11 +4,10 @@
|
||||
}@args:
|
||||
|
||||
callPackage ./common.nix ({
|
||||
# Details from https://www.azul.com/downloads/?version=java-18-sts&os=macos&package=jdk
|
||||
# Details from https://www.azul.com/downloads/?version=java-18-sts&package=jdk
|
||||
# Note that the latest build may differ by platform
|
||||
dists = {
|
||||
x86_64-darwin = {
|
||||
arch = "x64";
|
||||
zuluVersion = "18.32.13";
|
||||
jdkVersion = "18.0.2.1";
|
||||
hash =
|
||||
@@ -17,7 +16,6 @@ callPackage ./common.nix ({
|
||||
};
|
||||
|
||||
aarch64-darwin = {
|
||||
arch = "aarch64";
|
||||
zuluVersion = "18.32.13";
|
||||
jdkVersion = "18.0.2.1";
|
||||
hash =
|
||||
|
||||
@@ -4,11 +4,10 @@
|
||||
}@args:
|
||||
|
||||
callPackage ./common.nix ({
|
||||
# Details from https://www.azul.com/downloads/?version=java-19-sts&os=macos&package=jdk
|
||||
# Details from https://www.azul.com/downloads/?version=java-19-sts&package=jdk
|
||||
# Note that the latest build may differ by platform
|
||||
dists = {
|
||||
x86_64-darwin = {
|
||||
arch = "x64";
|
||||
zuluVersion = if enableJavaFX then "19.32.15" else "19.32.13";
|
||||
jdkVersion = "19.0.2";
|
||||
hash =
|
||||
@@ -17,7 +16,6 @@ callPackage ./common.nix ({
|
||||
};
|
||||
|
||||
aarch64-darwin = {
|
||||
arch = "aarch64";
|
||||
zuluVersion = if enableJavaFX then "19.32.15" else "19.32.13";
|
||||
jdkVersion = "19.0.2";
|
||||
hash =
|
||||
|
||||
@@ -4,11 +4,10 @@
|
||||
}@args:
|
||||
|
||||
callPackage ./common.nix ({
|
||||
# Details from https://www.azul.com/downloads/?version=java-19-sts&os=macos&package=jdk
|
||||
# Details from https://www.azul.com/downloads/?version=java-20-sts&package=jdk
|
||||
# Note that the latest build may differ by platform
|
||||
dists = {
|
||||
x86_64-darwin = {
|
||||
arch = "x64";
|
||||
zuluVersion = "20.32.11";
|
||||
jdkVersion = "20.0.2";
|
||||
hash =
|
||||
@@ -17,7 +16,6 @@ callPackage ./common.nix ({
|
||||
};
|
||||
|
||||
aarch64-darwin = {
|
||||
arch = "aarch64";
|
||||
zuluVersion = "20.32.11";
|
||||
jdkVersion = "20.0.2";
|
||||
hash =
|
||||
|
||||
@@ -4,11 +4,10 @@
|
||||
}@args:
|
||||
|
||||
callPackage ./common.nix ({
|
||||
# Details from https://www.azul.com/downloads/?version=java-8-lts&os=macos&package=jdk
|
||||
# Details from https://www.azul.com/downloads/?version=java-8-lts&package=jdk
|
||||
# Note that the latest build may differ by platform
|
||||
dists = {
|
||||
x86_64-darwin = {
|
||||
arch = "x64";
|
||||
zuluVersion = "8.72.0.17";
|
||||
jdkVersion = "8.0.382";
|
||||
hash =
|
||||
@@ -17,7 +16,6 @@ callPackage ./common.nix ({
|
||||
};
|
||||
|
||||
aarch64-darwin = {
|
||||
arch = "aarch64";
|
||||
zuluVersion = "8.72.0.17";
|
||||
jdkVersion = "8.0.382";
|
||||
hash =
|
||||
|
||||
@@ -10,6 +10,18 @@ let
|
||||
dist = dists.${stdenv.hostPlatform.system}
|
||||
or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
|
||||
|
||||
arch = {
|
||||
"aarch64" = "aarch64";
|
||||
"x86_64" = "x64";
|
||||
}.${stdenv.hostPlatform.parsed.cpu.name}
|
||||
or (throw "Unsupported architecture: ${stdenv.hostPlatform.parsed.cpu.name}");
|
||||
|
||||
platform = {
|
||||
"darwin" = "macosx";
|
||||
"linux" = "linux";
|
||||
}.${stdenv.hostPlatform.parsed.kernel.name}
|
||||
or (throw "Unsupported platform: ${stdenv.hostPlatform.parsed.kernel.name}");
|
||||
|
||||
jce-policies = fetchurl {
|
||||
url = "https://web.archive.org/web/20211126120343/http://cdn.azul.com/zcek/bin/ZuluJCEPolicies.zip";
|
||||
hash = "sha256-gCGii4ysQbRPFCH9IQoKCCL8r4jWLS5wo1sv9iioZ1o=";
|
||||
@@ -24,7 +36,7 @@ let
|
||||
version = dist.jdkVersion;
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://cdn.azul.com/zulu/bin/zulu${dist.zuluVersion}-${javaPackage}${dist.jdkVersion}-macosx_${dist.arch}.tar.gz";
|
||||
url = "https://cdn.azul.com/zulu/bin/zulu${dist.zuluVersion}-${javaPackage}${dist.jdkVersion}-${platform}_${arch}.tar.gz";
|
||||
inherit (dist) hash;
|
||||
curlOpts = "-H Referer:https://www.azul.com/downloads/zulu/";
|
||||
};
|
||||
@@ -39,7 +51,7 @@ let
|
||||
mv -f ZuluJCEPolicies/*.jar $out/${lib.optionalString isJdk8 "jre/"}lib/security/
|
||||
|
||||
# jni.h expects jni_md.h to be in the header search path.
|
||||
ln -s $out/include/darwin/*_md.h $out/include/
|
||||
ln -s $out/include/${stdenv.hostPlatform.parsed.kernel.name}/*_md.h $out/include/
|
||||
|
||||
if [ -f $out/LICENSE ]; then
|
||||
install -D $out/LICENSE $out/share/zulu/LICENSE
|
||||
@@ -62,7 +74,7 @@ let
|
||||
|
||||
# fixupPhase is moving the man to share/man which breaks it because it's a
|
||||
# relative symlink.
|
||||
postFixup = ''
|
||||
postFixup = lib.optionalString stdenv.isDarwin ''
|
||||
ln -nsf ../zulu-${lib.versions.major version}.jdk/Contents/Home/man $out/share/man
|
||||
'';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user