Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JDK updates and removals #344544

Merged
merged 22 commits into from
Sep 27, 2024
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
8 changes: 5 additions & 3 deletions pkgs/by-name/je/jextract/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
, fetchFromGitHub
, makeBinaryWrapper
, gradle
, jdk22
, jdk23
, llvmPackages
}:

Expand All @@ -25,7 +25,7 @@ stdenv.mkDerivation {

gradleFlags = [
"-Pllvm_home=${llvmPackages.libclang.lib}"
"-Pjdk22_home=${jdk22}"
"-Pjdk22_home=${jdk23}"
];

doCheck = true;
Expand All @@ -46,8 +46,10 @@ stdenv.mkDerivation {
description = "Tool which mechanically generates Java bindings from a native library headers";
mainProgram = "jextract";
homepage = "https://github.com/openjdk/jextract";
platforms = jdk22.meta.platforms;
platforms = jdk23.meta.platforms;
license = licenses.gpl2Only;
maintainers = with maintainers; [ jlesquembre sharzy ];
# Not yet updated for JDK 23
broken = true;
};
}
8 changes: 3 additions & 5 deletions pkgs/by-name/mo/moneydance/package.nix
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
{ lib, stdenv, fetchzip, makeWrapper, openjdk22, openjfx22, jvmFlags ? [ ] }:
{ lib, stdenv, fetchzip, makeWrapper, openjdk23, jvmFlags ? [ ] }:
let
openjfx = openjfx22;
jdk = openjdk22.override {
jdk = openjdk23.override {
enableJavaFX = true;
inherit openjfx;
};
in
stdenv.mkDerivation (finalAttrs: {
Expand All @@ -16,7 +14,7 @@ stdenv.mkDerivation (finalAttrs: {
};

nativeBuildInputs = [ makeWrapper ];
buildInputs = [ jdk openjfx ];
buildInputs = [ jdk ];

# Note the double escaping in the call to makeWrapper. The escapeShellArgs
# call quotes each element of the flags list as a word[1] and returns a
Expand Down
6 changes: 3 additions & 3 deletions pkgs/development/compilers/openjdk/11.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
let
major = "11";
minor = "0";
update = "23";
build = "9";
update = "24";
build = "8";

# when building a headless jdk, also bootstrap it with a headless jdk
openjdk-bootstrap = openjdk11-bootstrap.override { gtkSupport = !headless; };
Expand All @@ -25,7 +25,7 @@ let
owner = "openjdk";
repo = "jdk${major}u";
rev = "jdk-${version}";
sha256 = "sha256-6y6wge8ZuSKBpb5QNihvAlD4Pv/0d3AQCPOkxUm/sJk=";
hash = "sha256-H/VmT6NYbbZBba7Js8xk+epVZ2kLfvlwTNgg5SQ4ljA=";
};

nativeBuildInputs = [ pkg-config autoconf unzip ];
Expand Down
6 changes: 3 additions & 3 deletions pkgs/development/compilers/openjdk/17.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
let
version = {
feature = "17";
interim = ".0.11";
build = "9";
interim = ".0.12";
build = "7";
};

# when building a headless jdk, also bootstrap it with a headless jdk
Expand All @@ -26,7 +26,7 @@ let
owner = "openjdk";
repo = "jdk${version.feature}u";
rev = "jdk-${version.feature}${version.interim}+${version.build}";
sha256 = "sha256-aO4iSc9MklW/4q9U86WEfiiWnlq6iZSbxzq2fbsqd0A=";
hash = "sha256-9UB1H3gd+b4wWxOMgsdDPgX/IGWNORKk1gMsSjYoZMw=";
};

nativeBuildInputs = [ pkg-config autoconf unzip ];
Expand Down
6 changes: 3 additions & 3 deletions pkgs/development/compilers/openjdk/21.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
let
version = {
feature = "21";
interim = ".0.3";
build = "9";
interim = ".0.4";
build = "7";
};

# when building a headless jdk, also bootstrap it with a headless jdk
Expand All @@ -29,7 +29,7 @@ let
owner = "openjdk";
repo = "jdk${version.feature}u";
rev = "jdk-${version.feature}${version.interim}+${version.build}";
hash = "sha256-zRN16lrc5gtDlTVIQJRRx103w/VbRkatCLeEc9AXWPE=";
hash = "sha256-+xpQtQ1IQ7btVWnENT9XS5A/2VP101/+XR3BMo8BqYI=";
};

nativeBuildInputs = [ pkg-config autoconf unzip ensureNewerSourcesForZipFilesHook ];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
, libXcursor
, libXrandr
, fontconfig
, openjdk22-bootstrap
, openjdk23-bootstrap
, ensureNewerSourcesForZipFilesHook
, setJavaClassPath
# TODO(@sternenseemann): gtk3 fails to evaluate in pkgsCross.ghcjs.buildPackages
Expand All @@ -51,13 +51,13 @@ let
# $FEATURE.$INTERIM.$UPDATE.$PATCH
# See
# https://openjdk.org/jeps/223
# https://docs.oracle.com/en/java/javase/22/docs/api/java.base/java/lang/Runtime.Version.html
featureVersion = "22";
# https://docs.oracle.com/en/java/javase/23/docs/api/java.base/java/lang/Runtime.Version.html
featureVersion = "23";
info = builtins.getAttr featureVersion (lib.importJSON ./info.json);
version = info.version;

# when building a headless jdk, also bootstrap it with a headless jdk
openjdk-bootstrap = openjdk22-bootstrap.override { gtkSupport = !headless; };
openjdk-bootstrap = openjdk23-bootstrap.override { gtkSupport = !headless; };
in

stdenv.mkDerivation (finalAttrs: {
Expand Down Expand Up @@ -108,19 +108,9 @@ stdenv.mkDerivation (finalAttrs: {
patches = [
./fix-java-home-jdk21.patch
./read-truststore-from-env-jdk10.patch
./currency-date-range-jdk10.patch
./increase-javadoc-heap-jdk13.patch
./ignore-LegalNoticeFilePlugin-jdk18.patch

# -Wformat etc. are stricter in newer gccs, per
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79677
# so grab the work-around from
# https://src.fedoraproject.org/rpms/java-openjdk/pull-request/24
(fetchurl {
url = "https://src.fedoraproject.org/rpms/java-openjdk/raw/06c001c7d87f2e9fe4fedeef2d993bcd5d7afa2a/f/rh1673833-remove_removal_of_wformat_during_test_compilation.patch";
sha256 = "082lmc30x64x583vqq00c8y0wqih3y4r0mp1c4bqq36l22qv6b6r";
})

# Fix build for gnumake-4.4.1:
# https://github.com/openjdk/jdk/pull/12992
(fetchpatch {
Expand Down Expand Up @@ -274,7 +264,7 @@ stdenv.mkDerivation (finalAttrs: {
${finalAttrs.finalPackage}/bin/java \
-cp ${java-json} \
${./JavaUpdater.java} \
22 pkgs/development/compilers/openjdk/info.json
${featureVersion} pkgs/development/compilers/openjdk/info.json
'';

home = "${finalAttrs.finalPackage}/lib/openjdk";
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/compilers/openjdk/8.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ let
powerpc64le-linux = "ppc64le";
}.${stdenv.system} or (throw "Unsupported platform ${stdenv.system}");

update = "412";
update = "422";
build = "ga";

# when building a headless jdk, also bootstrap it with a headless jdk
Expand All @@ -34,7 +34,7 @@ let
owner = "openjdk";
repo = "jdk8u";
rev = "jdk${version}";
sha256 = "sha256-o+H5n5p6JG1giJj9OADgMbQPaoKMzLMFquKH536SHhM=";
hash = "sha256-uMo1DIkji+FPTbFRwURXybkLE5xv+teSClWP9RfAvfo=";
};
outputs = [ "out" "jre" ];

Expand Down
40 changes: 0 additions & 40 deletions pkgs/development/compilers/openjdk/bootstrap.nix

This file was deleted.

13 changes: 4 additions & 9 deletions pkgs/development/compilers/openjdk/info.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
{
"22": {
"version": "22.0.2-ga",
"repo": "jdk22u",
"hash": "sha256-Zo1LOumkt9zTaPqbDcRL8lVJMqVle0QqzThtIz0JRNo="
},
"21": {
"version": "21.0.3-ga",
"repo": "jdk21u",
"hash": "sha256-zRN16lrc5gtDlTVIQJRRx103w/VbRkatCLeEc9AXWPE="
"23": {
"version": "23-ga",
"repo": "jdk23u",
"hash": "sha256-lcLnWAiskWindOqWmOWiIHiYKXGSJZK4d20k19QZfrE="
}
}
31 changes: 0 additions & 31 deletions pkgs/development/compilers/openjdk/make-bootstrap.nix

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
, fetchFromGitHub
, fetchpatch2
, writeText
, openjdk21_headless
, openjdk23_headless
, gradle
, pkg-config
, perl
Expand All @@ -25,29 +25,29 @@

let
pname = "openjfx-modular-sdk";
major = "22";
update = ".0.2";
major = "23";
update = "";
build = "-ga";
repover = "${major}${update}${build}";
jdk = openjdk21_headless;
jdk = openjdk23_headless;

in stdenv.mkDerivation {
inherit pname;
version = "${major}${update}${build}";

src = fetchFromGitHub {
owner = "openjdk";
repo = "jfx22u";
repo = "jfx23u";
rev = repover;
hash = "sha256-7Q9nZ2p3KfQPt1A2ULwk64OU/5/ghEkcsf9ECD6Ln2g=";
hash = "sha256-a/ev91Rq7D3z9O56ZZQCgvvbfj5GBt5Lonow2NH3s/E=";
};

patches = [
# 8338701: Provide media support for libavcodec version 61
# <https://github.com/openjdk/jfx/pull/1552>
# <https://github.com/openjdk/jfx23u/pull/18>
(fetchpatch2 {
url = "https://github.com/openjdk/jfx/commit/6115b396bacf62f39dcaa93c7c0adcd60b428b8c.patch?full_index=1";
hash = "sha256-6EES4qsumFgXePZSDEetJC1Li65zquz3UjwRbq/6YJM=";
url = "https://github.com/openjdk/jfx23u/commit/aba60fda1c82f00e8e685107592305c403a31287.patch?full_index=1";
hash = "sha256-+aRhTwi4VQthAq1SH1jxPl0mTosNMKoTY52jm+jiKso=";
})
];

Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/compilers/temurin-bin/generate-sources.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import requests
import sys

feature_versions = (8, 11, 17, 21, 22)
feature_versions = (8, 11, 17, 21, 23)
oses = ("mac", "linux", "alpine-linux")
types = ("jre", "jdk")
impls = ("hotspot",)
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/compilers/temurin-bin/jdk-darwin.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ in
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; };
jdk-23 = common { sourcePerArch = sources.jdk.openjdk23; };
jre-23 = common { sourcePerArch = sources.jre.openjdk23; };
}
4 changes: 2 additions & 2 deletions pkgs/development/compilers/temurin-bin/jdk-linux.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ in
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; };
jdk-23 = common { sourcePerArch = sources.jdk.openjdk23; };
jre-23 = common { sourcePerArch = sources.jre.openjdk23; };
}
Loading
Loading