Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pkgs/development/compilers/temurin-bin/generate-sources.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
import requests
import sys

feature_versions = (8, 11, 16, 17, 18, 19, 20, 21)
feature_versions = (8, 11, 16, 17, 18, 19, 20, 21, 22)
oses = ("mac", "linux", "alpine-linux")
types = ("jre", "jdk")
impls = ("hotspot")
impls = ("hotspot",)

arch_to_nixos = {
"x64": ("x86_64",),
Expand Down
13 changes: 8 additions & 5 deletions pkgs/development/compilers/temurin-bin/jdk-darwin-base.nix
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{ name-prefix ? "temurin"
, brand-name ? "Eclipse Temurin"
, sourcePerArch
, knownVulnerabilities ? []
, knownVulnerabilities ? [ ]
}:

{ swingSupport ? true # not used for now
, lib, stdenv
, lib
, stdenv
, fetchurl
, setJavaClassPath
}:
Expand All @@ -17,7 +18,8 @@ let
(arch: builtins.elem arch validCpuTypes)
(builtins.attrNames sourcePerArch);
result = stdenv.mkDerivation {
pname = if sourcePerArch.packageType == "jdk"
pname =
if sourcePerArch.packageType == "jdk"
then "${name-prefix}-bin"
else "${name-prefix}-${sourcePerArch.packageType}-bin";
version =
Expand Down Expand Up @@ -66,10 +68,11 @@ let
license = licenses.gpl2Classpath;
sourceProvenance = with sourceTypes; [ binaryNativeCode binaryBytecode ];
description = "${brand-name}, prebuilt OpenJDK binary";
platforms = builtins.map (arch: arch + "-darwin") providedCpuTypes; # some inherit jre.meta.platforms
platforms = builtins.map (arch: arch + "-darwin") providedCpuTypes; # some inherit jre.meta.platforms
maintainers = with maintainers; [ taku0 ];
inherit knownVulnerabilities;
mainProgram = "java";
};
};
in result
in
result
23 changes: 15 additions & 8 deletions pkgs/development/compilers/temurin-bin/jdk-darwin.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,34 @@

let
sources = (lib.importJSON ./sources.json).hotspot.mac;
common = opts: callPackage (import ./jdk-darwin-base.nix opts) {};
common = opts: callPackage (import ./jdk-darwin-base.nix opts) { };

EOL = [ "This JDK version has reached End of Life." ];
in
{
jdk-8 = common { sourcePerArch = sources.jdk.openjdk8; };
jre-8 = common { sourcePerArch = sources.jre.openjdk8; };

jdk-11 = common { sourcePerArch = sources.jdk.openjdk11; };
jre-11 = common { sourcePerArch = sources.jre.openjdk11; };
jdk-16 = common { sourcePerArch = sources.jdk.openjdk16; };

jdk-16 = common { sourcePerArch = sources.jdk.openjdk16; knownVulnerabilities = EOL; };

jdk-17 = common { sourcePerArch = sources.jdk.openjdk17; };
jre-17 = common { sourcePerArch = sources.jre.openjdk17; };

jdk-18 = common { sourcePerArch = sources.jdk.openjdk18; };
jre-18 = common { sourcePerArch = sources.jre.openjdk18; };
jdk-18 = common { sourcePerArch = sources.jdk.openjdk18; knownVulnerabilities = EOL; };
jre-18 = common { sourcePerArch = sources.jre.openjdk18; knownVulnerabilities = EOL; };

jdk-19 = common { sourcePerArch = sources.jdk.openjdk19; };
jre-19 = common { sourcePerArch = sources.jre.openjdk19; };
jdk-19 = common { sourcePerArch = sources.jdk.openjdk19; knownVulnerabilities = EOL; };
jre-19 = common { sourcePerArch = sources.jre.openjdk19; knownVulnerabilities = EOL; };

jdk-20 = common { sourcePerArch = sources.jdk.openjdk20; };
jre-20 = common { sourcePerArch = sources.jre.openjdk20; };
jdk-20 = common { sourcePerArch = sources.jdk.openjdk20; knownVulnerabilities = EOL; };
jre-20 = common { sourcePerArch = sources.jre.openjdk20; knownVulnerabilities = EOL; };

jdk-21 = common { sourcePerArch = sources.jdk.openjdk21; };
jre-21 = common { sourcePerArch = sources.jre.openjdk21; };

jdk-22 = common { sourcePerArch = sources.jdk.openjdk22; };
jre-22 = common { sourcePerArch = sources.jre.openjdk22; };
}
24 changes: 14 additions & 10 deletions pkgs/development/compilers/temurin-bin/jdk-linux-base.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{ name-prefix ? "temurin"
, brand-name ? "Eclipse Temurin"
, sourcePerArch
, knownVulnerabilities ? []
, knownVulnerabilities ? [ ]
}:

{ stdenv
Expand All @@ -10,18 +10,18 @@
, autoPatchelfHook
, makeWrapper
, setJavaClassPath
# minimum dependencies
# minimum dependencies
, alsa-lib
, fontconfig
, freetype
, libffi
, xorg
, zlib
# runtime dependencies
# runtime dependencies
, cups
# runtime dependencies for GTK+ Look and Feel
# TODO(@sternenseemann): gtk3 fails to evaluate in pkgsCross.ghcjs.buildPackages
# which should be fixable, this is a no-rebuild workaround for GHC.
# runtime dependencies for GTK+ Look and Feel
# TODO(@sternenseemann): gtk3 fails to evaluate in pkgsCross.ghcjs.buildPackages
# which should be fixable, this is a no-rebuild workaround for GHC.
, gtkSupport ? !stdenv.targetPlatform.isGhcjs
, cairo
, glib
Expand All @@ -33,15 +33,18 @@ let
runtimeDependencies = [
cups
] ++ lib.optionals gtkSupport [
cairo glib gtk3
cairo
glib
gtk3
];
runtimeLibraryPath = lib.makeLibraryPath runtimeDependencies;
validCpuTypes = builtins.attrNames lib.systems.parse.cpuTypes;
providedCpuTypes = builtins.filter
(arch: builtins.elem arch validCpuTypes)
(builtins.attrNames sourcePerArch);
result = stdenv.mkDerivation {
pname = if sourcePerArch.packageType == "jdk"
pname =
if sourcePerArch.packageType == "jdk"
then "${name-prefix}-bin"
else "${name-prefix}-${sourcePerArch.packageType}-bin";

Expand Down Expand Up @@ -123,10 +126,11 @@ let
license = licenses.gpl2Classpath;
sourceProvenance = with sourceTypes; [ binaryNativeCode binaryBytecode ];
description = "${brand-name}, prebuilt OpenJDK binary";
platforms = builtins.map (arch: arch + "-linux") providedCpuTypes; # some inherit jre.meta.platforms
platforms = builtins.map (arch: arch + "-linux") providedCpuTypes; # some inherit jre.meta.platforms
maintainers = with maintainers; [ taku0 ];
inherit knownVulnerabilities;
mainProgram = "java";
};
};
in result
in
result
23 changes: 15 additions & 8 deletions pkgs/development/compilers/temurin-bin/jdk-linux.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,34 @@
let
variant = if stdenv.hostPlatform.isMusl then "alpine-linux" else "linux";
sources = (lib.importJSON ./sources.json).hotspot.${variant};
common = opts: callPackage (import ./jdk-linux-base.nix opts) {};
common = opts: callPackage (import ./jdk-linux-base.nix opts) { };

EOL = [ "This JDK version has reached End of Life." ];
in
{
jdk-8 = common { sourcePerArch = sources.jdk.openjdk8; };
jre-8 = common { sourcePerArch = sources.jre.openjdk8; };

jdk-11 = common { sourcePerArch = sources.jdk.openjdk11; };
jre-11 = common { sourcePerArch = sources.jre.openjdk11; };
jdk-16 = common { sourcePerArch = sources.jdk.openjdk16; };

jdk-16 = common { sourcePerArch = sources.jdk.openjdk16; knownVulnerabilities = EOL; };

jdk-17 = common { sourcePerArch = sources.jdk.openjdk17; };
jre-17 = common { sourcePerArch = sources.jre.openjdk17; };

jdk-18 = common { sourcePerArch = sources.jdk.openjdk18; };
jre-18 = common { sourcePerArch = sources.jre.openjdk18; };
jdk-18 = common { sourcePerArch = sources.jdk.openjdk18; knownVulnerabilities = EOL; };
jre-18 = common { sourcePerArch = sources.jre.openjdk18; knownVulnerabilities = EOL; };

jdk-19 = common { sourcePerArch = sources.jdk.openjdk19; };
jre-19 = common { sourcePerArch = sources.jre.openjdk19; };
jdk-19 = common { sourcePerArch = sources.jdk.openjdk19; knownVulnerabilities = EOL; };
jre-19 = common { sourcePerArch = sources.jre.openjdk19; knownVulnerabilities = EOL; };

jdk-20 = common { sourcePerArch = sources.jdk.openjdk20; };
jre-20 = common { sourcePerArch = sources.jre.openjdk20; };
jdk-20 = common { sourcePerArch = sources.jdk.openjdk20; knownVulnerabilities = EOL; };
jre-20 = common { sourcePerArch = sources.jre.openjdk20; knownVulnerabilities = EOL; };

jdk-21 = common { sourcePerArch = sources.jdk.openjdk21; };
jre-21 = common { sourcePerArch = sources.jre.openjdk21; };

jdk-22 = common { sourcePerArch = sources.jdk.openjdk22; };
jre-22 = common { sourcePerArch = sources.jre.openjdk22; };
}
Loading