git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #107547 from jerith666/openjdk-15
commit7aed38b8ab76bf326243711d257eafa76f15654f authorDoron Behar <doron.behar@gmail.com> dateWed 6 Jan 2021, 16:02 (6 years ago) parentc1891ad13e3d2b
8 files changed+214−43
pkgs/applications/networking/apache-directory-studio/default.nix+2−2 pkgs/development/compilers/openjdk/14.nix+157 pkgs/development/compilers/openjdk/darwin/default.nix+2−2 pkgs/development/compilers/openjdk/default.nix+11−11 pkgs/development/compilers/openjdk/openjfx/14.nix → pkgs/development/compilers/openjdk/openjfx/15.nix+8−6 pkgs/games/mindustry/default.nix+2−2 pkgs/servers/jitsi-videobridge/default.nix+7−1 pkgs/top-level/all-packages.nix+25−19
pkgs/applications/networking/apache-directory-studio/default.nix+2−2
@@ -1,4 +1,4 @@
1−{ stdenv, fetchurl, jdk14, makeWrapper, autoPatchelfHook, makeDesktopItem, glib, libsecret }:
1+{ stdenv, fetchurl, jdk, makeWrapper, autoPatchelfHook, makeDesktopItem, glib, libsecret }:
22
33let
44 desktopItem = makeDesktopItem {
@@ -39,7 +39,7 @@ stdenv.mkDerivation rec {
3939
4040 makeWrapper "$dest/ApacheDirectoryStudio" \
4141 "$out/bin/ApacheDirectoryStudio" \
42− --prefix PATH : "${jdk14}/bin"
42+ --prefix PATH : "${jdk}/bin"
4343 install -D icon.xpm "$out/share/pixmaps/apache-directory-studio.xpm"
4444 install -D -t "$out/share/applications" ${desktopItem}/share/applications/*
4545 '';
pkgs/development/compilers/openjdk/14.nixnew file+157
@@ -0,0 +1,157 @@
1+{ stdenv, lib, fetchurl, bash, pkg-config, autoconf, cpio, file, which, unzip
2+, zip, perl, cups, freetype, alsaLib, libjpeg, giflib, libpng, zlib, lcms2
3+, libX11, libICE, libXrender, libXext, libXt, libXtst, libXi, libXinerama
4+, libXcursor, libXrandr, fontconfig, openjdk14-bootstrap
5+, setJavaClassPath
6+, headless ? false
7+, enableJavaFX ? openjfx.meta.available, openjfx
8+, enableGnome2 ? true, gtk3, gnome_vfs, glib, GConf
9+}:
10+
11+let
12+ major = "14";
13+ update = ".0.2";
14+ build = "-ga";
15+
16+ openjdk = stdenv.mkDerivation rec {
17+ pname = "openjdk" + lib.optionalString headless "-headless";
18+ version = "${major}${update}${build}";
19+
20+ src = fetchurl {
21+ url = "https://hg.openjdk.java.net/jdk-updates/jdk${major}u/archive/jdk-${version}.tar.gz";
22+ sha256 = "1s1pc6ihzf0awp4hbaqfxmbica0hnrg8nr7s0yd2hfn7nan8xmf3";
23+ };
24+
25+ nativeBuildInputs = [ pkg-config autoconf ];
26+ buildInputs = [
27+ cpio file which unzip zip perl zlib cups freetype alsaLib libjpeg giflib
28+ libpng zlib lcms2 libX11 libICE libXrender libXext libXtst libXt libXtst
29+ libXi libXinerama libXcursor libXrandr fontconfig openjdk14-bootstrap
30+ ] ++ lib.optionals (!headless && enableGnome2) [
31+ gtk3 gnome_vfs GConf glib
32+ ];
33+
34+ patches = [
35+ ./fix-java-home-jdk10.patch
36+ ./read-truststore-from-env-jdk10.patch
37+ ./currency-date-range-jdk10.patch
38+ ./increase-javadoc-heap-jdk13.patch
39+ # -Wformat etc. are stricter in newer gccs, per
40+ # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79677
41+ # so grab the work-around from
42+ # https://src.fedoraproject.org/rpms/java-openjdk/pull-request/24
43+ (fetchurl {
44+ url = "https://src.fedoraproject.org/rpms/java-openjdk/raw/06c001c7d87f2e9fe4fedeef2d993bcd5d7afa2a/f/rh1673833-remove_removal_of_wformat_during_test_compilation.patch";
45+ sha256 = "082lmc30x64x583vqq00c8y0wqih3y4r0mp1c4bqq36l22qv6b6r";
46+ })
47+ ] ++ lib.optionals (!headless && enableGnome2) [
48+ ./swing-use-gtk-jdk13.patch
49+ ];
50+
51+ prePatch = ''
52+ chmod +x configure
53+ patchShebangs --build configure
54+ '';
55+
56+ configureFlags = [
57+ "--with-boot-jdk=${openjdk14-bootstrap.home}"
58+ "--enable-unlimited-crypto"
59+ "--with-native-debug-symbols=internal"
60+ "--with-libjpeg=system"
61+ "--with-giflib=system"
62+ "--with-libpng=system"
63+ "--with-zlib=system"
64+ "--with-lcms=system"
65+ "--with-stdc++lib=dynamic"
66+ ] ++ lib.optional stdenv.isx86_64 "--with-jvm-features=zgc"
67+ ++ lib.optional headless "--enable-headless-only"
68+ ++ lib.optional (!headless && enableJavaFX) "--with-import-modules=${openjfx}";
69+
70+ separateDebugInfo = true;
71+
72+ NIX_CFLAGS_COMPILE = "-Wno-error";
73+
74+ NIX_LDFLAGS = toString (lib.optionals (!headless) [
75+ "-lfontconfig" "-lcups" "-lXinerama" "-lXrandr" "-lmagic"
76+ ] ++ lib.optionals (!headless && enableGnome2) [
77+ "-lgtk-3" "-lgio-2.0" "-lgnomevfs-2" "-lgconf-2"
78+ ]);
79+
80+ buildFlags = [ "all" ];
81+
82+ installPhase = ''
83+ mkdir -p $out/lib
84+
85+ mv build/*/images/jdk $out/lib/openjdk
86+
87+ # Remove some broken manpages.
88+ rm -rf $out/lib/openjdk/man/ja*
89+
90+ # Mirror some stuff in top-level.
91+ mkdir -p $out/share
92+ ln -s $out/lib/openjdk/include $out/include
93+ ln -s $out/lib/openjdk/man $out/share/man
94+ ln -s $out/lib/openjdk/lib/src.zip $out/lib/src.zip
95+
96+ # jni.h expects jni_md.h to be in the header search path.
97+ ln -s $out/include/linux/*_md.h $out/include/
98+
99+ # Remove crap from the installation.
100+ rm -rf $out/lib/openjdk/demo
101+ ${lib.optionalString headless ''
102+ rm $out/lib/openjdk/lib/{libjsound,libfontmanager}.so
103+ ''}
104+
105+ ln -s $out/lib/openjdk/bin $out/bin
106+ '';
107+
108+ preFixup = ''
109+ # Propagate the setJavaClassPath setup hook so that any package
110+ # that depends on the JDK has $CLASSPATH set up properly.
111+ mkdir -p $out/nix-support
112+ #TODO or printWords? cf https://github.com/NixOS/nixpkgs/pull/27427#issuecomment-317293040
113+ echo -n "${setJavaClassPath}" > $out/nix-support/propagated-build-inputs
114+
115+ # Set JAVA_HOME automatically.
116+ mkdir -p $out/nix-support
117+ cat <<EOF > $out/nix-support/setup-hook
118+ if [ -z "\''${JAVA_HOME-}" ]; then export JAVA_HOME=$out/lib/openjdk; fi
119+ EOF
120+ '';
121+
122+ postFixup = ''
123+ # Build the set of output library directories to rpath against
124+ LIBDIRS=""
125+ for output in $outputs; do
126+ if [ "$output" = debug ]; then continue; fi
127+ LIBDIRS="$(find $(eval echo \$$output) -name \*.so\* -exec dirname {} \+ | sort | uniq | tr '\n' ':'):$LIBDIRS"
128+ done
129+ # Add the local library paths to remove dependencies on the bootstrap
130+ for output in $outputs; do
131+ if [ "$output" = debug ]; then continue; fi
132+ OUTPUTDIR=$(eval echo \$$output)
133+ BINLIBS=$(find $OUTPUTDIR/bin/ -type f; find $OUTPUTDIR -name \*.so\*)
134+ echo "$BINLIBS" | while read i; do
135+ patchelf --set-rpath "$LIBDIRS:$(patchelf --print-rpath "$i")" "$i" || true
136+ patchelf --shrink-rpath "$i" || true
137+ done
138+ done
139+ '';
140+
141+ disallowedReferences = [ openjdk14-bootstrap ];
142+
143+ meta = with stdenv.lib; {
144+ homepage = "https://openjdk.java.net/";
145+ license = licenses.gpl2;
146+ description = "The open-source Java Development Kit";
147+ maintainers = with maintainers; [ edwtjo ];
148+ platforms = [ "i686-linux" "x86_64-linux" "aarch64-linux" "armv7l-linux" "armv6l-linux" ];
149+ };
150+
151+ passthru = {
152+ architecture = "";
153+ home = "${openjdk}/lib/openjdk";
154+ inherit gtk3;
155+ };
156+ };
157+in openjdk
pkgs/development/compilers/openjdk/darwin/default.nix+2−2
@@ -7,11 +7,11 @@ let
77 };
88
99 jdk = stdenv.mkDerivation rec {
10− name = "zulu14.28.21-ca-jdk14.0.1";
10+ name = "zulu15.28.51-ca-jdk15.0.1";
1111
1212 src = fetchurl {
1313 url = "https://cdn.azul.com/zulu/bin/${name}-macosx_x64.tar.gz";
14− sha256 = "1pc0y3fxhlf42a51qbdha1fabci61yzq70kk5c1rzk0ai78d92q8";
14+ sha256 = "0h738pbnwcn7pjp0qyryzazqj5nw5sy2f8l0ycl39crm9ia6akvh";
1515 curlOpts = "-H Referer:https://www.azul.com/downloads/zulu/";
1616 };
1717
pkgs/development/compilers/openjdk/default.nix+11−11
@@ -1,7 +1,7 @@
1−{ stdenv, lib, fetchurl, bash, pkgconfig, autoconf, cpio, file, which, unzip
1+{ stdenv, lib, fetchurl, bash, pkg-config, autoconf, cpio, file, which, unzip
22, zip, perl, cups, freetype, alsaLib, libjpeg, giflib, libpng, zlib, lcms2
33, libX11, libICE, libXrender, libXext, libXt, libXtst, libXi, libXinerama
4−, libXcursor, libXrandr, fontconfig, openjdk14-bootstrap
4+, libXcursor, libXrandr, fontconfig, openjdk15-bootstrap
55, setJavaClassPath
66, headless ? false
77, enableJavaFX ? openjfx.meta.available, openjfx
@@ -9,8 +9,8 @@
99}:
1010
1111let
12− major = "14";
13− update = ".0.2";
12+ major = "15";
13+ update = ".0.1";
1414 build = "-ga";
1515
1616 openjdk = stdenv.mkDerivation rec {
@@ -18,15 +18,15 @@ let
1818 version = "${major}${update}${build}";
1919
2020 src = fetchurl {
21− url = "http://hg.openjdk.java.net/jdk-updates/jdk${major}u/archive/jdk-${version}.tar.gz";
22− sha256 = "1s1pc6ihzf0awp4hbaqfxmbica0hnrg8nr7s0yd2hfn7nan8xmf3";
21+ url = "https://hg.openjdk.java.net/jdk-updates/jdk${major}u/archive/jdk-${version}.tar.gz";
22+ sha256 = "1h8n5figc9q0k9p8b0qggyhvqagvxanfih1lj5j492c74cd1mx1l";
2323 };
2424
25− nativeBuildInputs = [ pkgconfig autoconf ];
25+ nativeBuildInputs = [ pkg-config autoconf ];
2626 buildInputs = [
2727 cpio file which unzip zip perl zlib cups freetype alsaLib libjpeg giflib
2828 libpng zlib lcms2 libX11 libICE libXrender libXext libXtst libXt libXtst
29− libXi libXinerama libXcursor libXrandr fontconfig openjdk14-bootstrap
29+ libXi libXinerama libXcursor libXrandr fontconfig openjdk15-bootstrap
3030 ] ++ lib.optionals (!headless && enableGnome2) [
3131 gtk3 gnome_vfs GConf glib
3232 ];
@@ -54,7 +54,7 @@ let
5454 '';
5555
5656 configureFlags = [
57− "--with-boot-jdk=${openjdk14-bootstrap.home}"
57+ "--with-boot-jdk=${openjdk15-bootstrap.home}"
5858 "--enable-unlimited-crypto"
5959 "--with-native-debug-symbols=internal"
6060 "--with-libjpeg=system"
@@ -138,10 +138,10 @@ let
138138 done
139139 '';
140140
141− disallowedReferences = [ openjdk14-bootstrap ];
141+ disallowedReferences = [ openjdk15-bootstrap ];
142142
143143 meta = with stdenv.lib; {
144− homepage = "http://openjdk.java.net/";
144+ homepage = "https://openjdk.java.net/";
145145 license = licenses.gpl2;
146146 description = "The open-source Java Development Kit";
147147 maintainers = with maintainers; [ edwtjo ];
pkgs/development/compilers/openjdk/openjfx/14.nix → pkgs/development/compilers/openjdk/openjfx/15.nixrenamed+8−6
@@ -3,9 +3,9 @@
33, ffmpeg_3, python, ruby }:
44
55let
6− major = "14";
7− update = "";
8− build = "-ga";
6+ major = "15";
7+ update = ".0.1";
8+ build = "+1";
99 repover = "${major}${update}${build}";
1010 gradle_ = (gradleGen.override {
1111 java = openjdk11_headless;
@@ -18,7 +18,7 @@ let
1818 owner = "openjdk";
1919 repo = "jfx";
2020 rev = repover;
21− sha256 = "16aj15xksc266gv3y42m0g277pfvp71901lrngndcnpr7i2zshnr";
21+ sha256 = "019glq8rhn6amy3n5jc17vi2wpf1pxpmmywvyz1ga8n09w7xscq1";
2222 };
2323
2424 buildInputs = [ gtk2 gtk3 libXtst libXxf86vm glib alsaLib ffmpeg_3 ];
@@ -64,8 +64,10 @@ let
6464 outputHashMode = "recursive";
6565 # Downloaded AWT jars differ by platform.
6666 outputHash = {
67− x86_64-linux = "077zss95iq6iskx7ghz1c57ymydpzj0wm7r1pkznw99l9xwvdmqi";
68− i686-linux = "03gglr2sh77cyg16qw9g45ji33dg7i93s5s30hz3mh420g112qa0";
67+ x86_64-linux = "0hmyr5nnjgwyw3fcwqf0crqg9lny27jfirycg3xmkzbcrwqd6qkw";
68+ # The build-time dependencies don't currently build for i686, so no
69+ # reason to fetch this one correctly either...
70+ i686-linux = "0000000000000000000000000000000000000000000000000000";
6971 }.${stdenv.system} or (throw "Unsupported platform");
7072 };
7173
pkgs/games/mindustry/default.nix+2−2
@@ -3,7 +3,7 @@
33, makeDesktopItem
44, fetchFromGitHub
55, gradleGen
6−, jdk14
6+, jdk
77, perl
88, jre
99, alsaLib
@@ -58,7 +58,7 @@ let
5858 '';
5959
6060 # The default one still uses jdk8 (#89731)
61− gradle_6 = (gradleGen.override (old: { java = jdk14; })).gradle_6_7;
61+ gradle_6 = (gradleGen.override (old: { java = jdk; })).gradle_6_7;
6262
6363 # fake build to pre-download deps into fixed-output derivation
6464 deps = stdenv.mkDerivation {
pkgs/servers/jitsi-videobridge/default.nix+7−1
@@ -1,4 +1,4 @@
1−{ stdenv, fetchurl, dpkg, jre_headless, nixosTests }:
1+{ stdenv, fetchurl, makeWrapper, dpkg, jre_headless, nixosTests }:
22
33let
44 pname = "jitsi-videobridge2";
@@ -15,6 +15,8 @@ stdenv.mkDerivation {
1515
1616 unpackCmd = "${dpkg}/bin/dpkg-deb -x $src debcontents";
1717
18+ buildInputs = [ makeWrapper ];
19+
1820 installPhase = ''
1921 substituteInPlace usr/share/jitsi-videobridge/jvb.sh \
2022 --replace "exec java" "exec ${jre_headless}/bin/java"
@@ -24,6 +26,10 @@ stdenv.mkDerivation {
2426 cp ${./logging.properties-journal} $out/etc/jitsi/videobridge/logging.properties-journal
2527 mv usr/share/jitsi-videobridge/* $out/share/jitsi-videobridge/
2628 ln -s $out/share/jitsi-videobridge/jvb.sh $out/bin/jitsi-videobridge
29+
30+ # work around https://github.com/jitsi/jitsi-videobridge/issues/1547
31+ wrapProgram $out/bin/jitsi-videobridge \
32+ --set VIDEOBRIDGE_GC_TYPE G1GC
2733 '';
2834
2935 passthru.tests = {
pkgs/top-level/all-packages.nix+25−19
@@ -9702,7 +9702,7 @@ in
97029702
97039703 openjfx11 = callPackage ../development/compilers/openjdk/openjfx/11.nix { };
97049704
9705− openjfx14 = callPackage ../development/compilers/openjdk/openjfx/14.nix { };
9705+ openjfx15 = callPackage ../development/compilers/openjdk/openjfx/15.nix { };
97069706
97079707 openjdk8-bootstrap =
97089708 if adoptopenjdk-hotspot-bin-8.meta.available then
@@ -9752,21 +9752,27 @@ in
97529752 else
97539753 openjdk11.override { headless = true; };
97549754
9755− openjdk14-bootstrap =
9756− if adoptopenjdk-hotspot-bin-13.meta.available then
9757− adoptopenjdk-hotspot-bin-13
9755+ openjdk15-bootstrap =
9756+ if adoptopenjdk-hotspot-bin-14.meta.available then
9757+ adoptopenjdk-hotspot-bin-14
97589758 else
9759− /* adoptopenjdk not available for i686, so fall back to our old builds of 12 & 13 for bootstrapping */
9760− callPackage ../development/compilers/openjdk/13.nix {
9759+ /* adoptopenjdk not available for i686, so fall back to our old builds of 12, 13, & 14 for bootstrapping */
9760+ callPackage ../development/compilers/openjdk/14.nix {
97619761 openjfx = openjfx11; /* need this despite next line :-( */
97629762 enableJavaFX = false;
97639763 headless = true;
97649764 inherit (gnome2) GConf gnome_vfs;
9765− openjdk13-bootstrap = callPackage ../development/compilers/openjdk/12.nix {
9765+ openjdk14-bootstrap = callPackage ../development/compilers/openjdk/13.nix {
97669766 openjfx = openjfx11; /* need this despite next line :-( */
97679767 enableJavaFX = false;
97689768 headless = true;
97699769 inherit (gnome2) GConf gnome_vfs;
9770+ openjdk13-bootstrap = callPackage ../development/compilers/openjdk/12.nix {
9771+ openjfx = openjfx11; /* need this despite next line :-( */
9772+ enableJavaFX = false;
9773+ headless = true;
9774+ inherit (gnome2) GConf gnome_vfs;
9775+ };
97709776 };
97719777 };
97729778
@@ -9774,27 +9780,27 @@ in
97749780 jdk11_headless = openjdk11_headless;
97759781
97769782 /* Latest JDK */
9777− openjdk14 =
9783+ openjdk15 =
97789784 if stdenv.isDarwin then
97799785 callPackage ../development/compilers/openjdk/darwin { }
97809786 else
97819787 callPackage ../development/compilers/openjdk {
9782− openjfx = openjfx14;
9788+ openjfx = openjfx15;
97839789 inherit (gnome2) GConf gnome_vfs;
97849790 };
97859791
9786− openjdk14_headless =
9792+ openjdk15_headless =
97879793 if stdenv.isDarwin then
9788− openjdk14
9794+ openjdk15
97899795 else
9790− openjdk14.override { headless = true; };
9796+ openjdk15.override { headless = true; };
97919797
9792− jdk14 = openjdk14;
9793− jdk14_headless = openjdk14_headless;
9798+ jdk15 = openjdk15;
9799+ jdk15_headless = openjdk15_headless;
97949800
97959801 /* default JDK */
97969802
9797− jdk = jdk14;
9803+ jdk = jdk15;
97989804
97999805 # Since the introduction of the Java Platform Module System in Java 9, Java
98009806 # no longer ships a separate JRE package.
@@ -9803,13 +9809,13 @@ in
98039809 # 'jre_minimal' to build a bespoke JRE containing only the modules you need.
98049810 #
98059811 # For a general-purpose system, 'jre' defaults to the full JDK:
9806− jre = jdk14;
9807− jre_headless = jdk14_headless;
9812+ jre = jdk15;
9813+ jre_headless = jdk15_headless;
98089814
98099815 jre_minimal = callPackage ../development/compilers/openjdk/jre.nix { };
98109816
9811− openjdk = openjdk14;
9812− openjdk_headless = openjdk14_headless;
9817+ openjdk = openjdk15;
9818+ openjdk_headless = openjdk15_headless;
98139819
98149820 inherit (callPackages ../development/compilers/graalvm {
98159821 gcc = if stdenv.targetPlatform.isDarwin then gcc8 else gcc;