diff options
Diffstat (limited to 'pkgs/development/compilers/openjdk/21.nix')
-rw-r--r-- | pkgs/development/compilers/openjdk/21.nix | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/pkgs/development/compilers/openjdk/21.nix b/pkgs/development/compilers/openjdk/21.nix index 623ac281acf7f..9c403fb2755dc 100644 --- a/pkgs/development/compilers/openjdk/21.nix +++ b/pkgs/development/compilers/openjdk/21.nix @@ -8,14 +8,14 @@ # which should be fixable, this is a no-rebuild workaround for GHC. , headless ? stdenv.targetPlatform.isGhcjs , enableJavaFX ? false, openjfx -, enableGnome2 ? true, gtk3, gnome_vfs, glib, GConf +, enableGtk ? true, gtk3, glib }: let version = { feature = "21"; - interim = ""; - build = "35"; + interim = ".0.3"; + build = "9"; }; # when building a headless jdk, also bootstrap it with a headless jdk @@ -29,7 +29,7 @@ let owner = "openjdk"; repo = "jdk${version.feature}u"; rev = "jdk-${version.feature}${version.interim}+${version.build}"; - hash = "sha256-fA8nRWBuTL87S8mwapmNfCPPQoI2aKHjbHJ6PDN3khs="; + hash = "sha256-zRN16lrc5gtDlTVIQJRRx103w/VbRkatCLeEc9AXWPE="; }; nativeBuildInputs = [ pkg-config autoconf unzip ensureNewerSourcesForZipFilesHook ]; @@ -37,8 +37,8 @@ let cpio file which zip perl zlib cups freetype alsa-lib libjpeg giflib libpng zlib lcms2 libX11 libICE libXrender libXext libXtst libXt libXtst libXi libXinerama libXcursor libXrandr fontconfig openjdk-bootstrap - ] ++ lib.optionals (!headless && enableGnome2) [ - gtk3 gnome_vfs GConf glib + ] ++ lib.optionals (!headless && enableGtk) [ + gtk3 glib ]; patches = [ @@ -64,7 +64,7 @@ let url = "https://github.com/openjdk/jdk/commit/9341d135b855cc208d48e47d30cd90aafa354c36.patch"; hash = "sha256-Qcm3ZmGCOYLZcskNjj7DYR85R4v07vYvvavrVOYL8vg="; }) - ] ++ lib.optionals (!headless && enableGnome2) [ + ] ++ lib.optionals (!headless && enableGtk) [ ./swing-use-gtk-jdk13.patch ]; @@ -91,9 +91,16 @@ let "--with-zlib=system" "--with-lcms=system" "--with-stdc++lib=dynamic" - ] ++ lib.optional stdenv.isx86_64 "--with-jvm-features=zgc" - ++ lib.optional headless "--enable-headless-only" - ++ lib.optional (!headless && enableJavaFX) "--with-import-modules=${openjfx}"; + ] + ++ lib.optionals stdenv.cc.isClang [ + "--with-toolchain-type=clang" + # Explicitly tell Clang to compile C++ files as C++, see + # https://github.com/NixOS/nixpkgs/issues/150655#issuecomment-1935304859 + "--with-extra-cxxflags=-xc++" + ] + ++ lib.optional stdenv.isx86_64 "--with-jvm-features=zgc" + ++ lib.optional headless "--enable-headless-only" + ++ lib.optional (!headless && enableJavaFX) "--with-import-modules=${openjfx}"; separateDebugInfo = true; @@ -101,8 +108,8 @@ let NIX_LDFLAGS = toString (lib.optionals (!headless) [ "-lfontconfig" "-lcups" "-lXinerama" "-lXrandr" "-lmagic" - ] ++ lib.optionals (!headless && enableGnome2) [ - "-lgtk-3" "-lgio-2.0" "-lgnomevfs-2" "-lgconf-2" + ] ++ lib.optionals (!headless && enableGtk) [ + "-lgtk-3" "-lgio-2.0" ]); # -j flag is explicitly rejected by the build system: |