Merge pull request #48326 from jerith666/jdk11
openjdk: 10.0.2 -> 11.0.1
This commit is contained in:
commit
38db6fdfb9
@ -1,4 +1,4 @@
|
|||||||
{ fetchurl, stdenv, makeDesktopItem, makeWrapper, unzip, jre10 }:
|
{ fetchurl, stdenv, makeDesktopItem, makeWrapper, unzip, jdk11 }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "josm-${version}";
|
name = "josm-${version}";
|
||||||
@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
|
|||||||
sha256 = "102dph3479qskzf72cpb9139pq9ifka6pzna1c6s5rs2il6mfvsb";
|
sha256 = "102dph3479qskzf72cpb9139pq9ifka6pzna1c6s5rs2il6mfvsb";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ jre10 makeWrapper ];
|
buildInputs = [ jdk11 makeWrapper ];
|
||||||
|
|
||||||
desktopItem = makeDesktopItem {
|
desktopItem = makeDesktopItem {
|
||||||
name = "josm";
|
name = "josm";
|
||||||
@ -25,7 +25,7 @@ stdenv.mkDerivation rec {
|
|||||||
mkdir -p $out/bin $out/share/java
|
mkdir -p $out/bin $out/share/java
|
||||||
cp -v $src $out/share/java/josm.jar
|
cp -v $src $out/share/java/josm.jar
|
||||||
|
|
||||||
makeWrapper ${jre10}/bin/java $out/bin/josm \
|
makeWrapper ${jdk11}/bin/java $out/bin/josm \
|
||||||
--add-flags "-jar $out/share/java/josm.jar"
|
--add-flags "-jar $out/share/java/josm.jar"
|
||||||
|
|
||||||
mkdir -p $out/share/applications
|
mkdir -p $out/share/applications
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ stdenv, lib, fetchurl, bash, cpio, pkgconfig, file, which, unzip, zip, cups, freetype
|
{ stdenv, lib, fetchurl, bash, cpio, autoconf, pkgconfig, file, which, unzip, zip, cups, freetype
|
||||||
, alsaLib, bootjdk, perl, liberation_ttf, fontconfig, zlib, lndir
|
, alsaLib, bootjdk, perl, liberation_ttf, fontconfig, zlib, lndir
|
||||||
, libX11, libICE, libXrender, libXext, libXt, libXtst, libXi, libXinerama, libXcursor, libXrandr
|
, libX11, libICE, libXrender, libXext, libXt, libXtst, libXi, libXinerama, libXcursor, libXrandr
|
||||||
, libjpeg, giflib
|
, libjpeg, giflib
|
||||||
@ -10,31 +10,30 @@
|
|||||||
let
|
let
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The JRE libraries are in directories that depend on the CPU.
|
* The JDK libraries are in directories that depend on the CPU.
|
||||||
*/
|
*/
|
||||||
architecture =
|
architecture =
|
||||||
if stdenv.hostPlatform.system == "i686-linux" then
|
if stdenv.hostPlatform.system == "i686-linux" then
|
||||||
"i386"
|
"i386"
|
||||||
else "amd64";
|
else "amd64";
|
||||||
|
|
||||||
update = "10.0.2";
|
major = "11";
|
||||||
|
update = ".0.1";
|
||||||
build = "13";
|
build = "13";
|
||||||
repover = "jdk-${update}+${build}";
|
repover = "jdk-${major}${update}+${build}";
|
||||||
paxflags = if stdenv.isi686 then "msp" else "m";
|
paxflags = if stdenv.isi686 then "msp" else "m";
|
||||||
|
|
||||||
openjdk10 = stdenv.mkDerivation {
|
openjdk = stdenv.mkDerivation {
|
||||||
name = "openjdk-${update}-b${build}";
|
name = "openjdk-${major}${update}-b${build}";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "http://hg.openjdk.java.net/jdk-updates/jdk10u/archive/${repover}.tar.gz";
|
url = "http://hg.openjdk.java.net/jdk-updates/jdk${major}u/archive/${repover}.tar.gz";
|
||||||
sha256 = "0y7hyzgvn6z8gyp3h9xvxwj6zda899y6i629jn6yxqzj96q56jpk";
|
sha256 = "1ri3fv67rvs9xxhc3ynklbprhxbdsgpwafbw6wqj950xy5crgysm";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = [ "out" "jre" ];
|
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig ];
|
nativeBuildInputs = [ pkgconfig ];
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
cpio file which unzip zip perl bootjdk zlib cups freetype alsaLib
|
autoconf cpio file which unzip zip perl bootjdk zlib cups freetype alsaLib
|
||||||
libjpeg giflib libX11 libICE libXext libXrender libXtst libXt libXtst
|
libjpeg giflib libX11 libICE libXext libXrender libXtst libXt libXtst
|
||||||
libXi libXinerama libXcursor libXrandr lndir fontconfig
|
libXi libXinerama libXcursor libXrandr lndir fontconfig
|
||||||
] ++ lib.optionals (!minimal && enableGnome2) [
|
] ++ lib.optionals (!minimal && enableGnome2) [
|
||||||
@ -55,12 +54,11 @@ let
|
|||||||
|
|
||||||
configureFlagsArray=(
|
configureFlagsArray=(
|
||||||
"--with-boot-jdk=${bootjdk.home}"
|
"--with-boot-jdk=${bootjdk.home}"
|
||||||
"--with-update-version=${update}"
|
"--with-update-version=${major}${update}"
|
||||||
"--with-build-number=${build}"
|
"--with-build-number=${build}"
|
||||||
"--with-milestone=fcs"
|
"--with-milestone=fcs"
|
||||||
"--enable-unlimited-crypto"
|
"--enable-unlimited-crypto"
|
||||||
"--disable-debug-symbols"
|
"--disable-debug-symbols"
|
||||||
"--disable-freetype-bundling"
|
|
||||||
"--with-zlib=system"
|
"--with-zlib=system"
|
||||||
"--with-giflib=system"
|
"--with-giflib=system"
|
||||||
"--with-stdc++lib=dynamic"
|
"--with-stdc++lib=dynamic"
|
||||||
@ -86,7 +84,7 @@ let
|
|||||||
buildFlags = [ "all" ];
|
buildFlags = [ "all" ];
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/lib/openjdk $out/share $jre/lib/openjdk
|
mkdir -p $out/lib/openjdk $out/share
|
||||||
|
|
||||||
cp -av build/*/images/jdk/* $out/lib/openjdk
|
cp -av build/*/images/jdk/* $out/lib/openjdk
|
||||||
|
|
||||||
@ -101,57 +99,29 @@ let
|
|||||||
# jni.h expects jni_md.h to be in the header search path.
|
# jni.h expects jni_md.h to be in the header search path.
|
||||||
ln -s $out/include/linux/*_md.h $out/include/
|
ln -s $out/include/linux/*_md.h $out/include/
|
||||||
|
|
||||||
# Copy the JRE to a separate output and setup fallback fonts
|
|
||||||
cp -av build/*/images/jre $jre/lib/openjdk/
|
|
||||||
mkdir $out/lib/openjdk/jre
|
|
||||||
${lib.optionalString (!minimal) ''
|
|
||||||
mkdir -p $jre/lib/openjdk/jre/lib/fonts/fallback
|
|
||||||
lndir ${liberation_ttf}/share/fonts/truetype $jre/lib/openjdk/jre/lib/fonts/fallback
|
|
||||||
''}
|
|
||||||
|
|
||||||
# Remove crap from the installation.
|
# Remove crap from the installation.
|
||||||
rm -rf $out/lib/openjdk/demo
|
rm -rf $out/lib/openjdk/demo
|
||||||
${lib.optionalString minimal ''
|
${lib.optionalString minimal ''
|
||||||
for d in $out/lib/openjdk/lib $jre/lib/openjdk/jre/lib; do
|
rm $out/lib/openjdk/lib/{libjsound,libfontmanager}.so
|
||||||
rm ''${d}/{libjsound,libjsoundalsa,libfontmanager}.so
|
|
||||||
done
|
|
||||||
''}
|
''}
|
||||||
|
|
||||||
lndir $jre/lib/openjdk/jre $out/lib/openjdk/jre
|
|
||||||
|
|
||||||
# Set PaX markings
|
# Set PaX markings
|
||||||
exes=$(file $out/lib/openjdk/bin/* $jre/lib/openjdk/jre/bin/* 2> /dev/null | grep -E 'ELF.*(executable|shared object)' | sed -e 's/: .*$//')
|
exes=$(file $out/lib/openjdk/bin/* 2> /dev/null | grep -E 'ELF.*(executable|shared object)' | sed -e 's/: .*$//')
|
||||||
echo "to mark: *$exes*"
|
echo "to mark: *$exes*"
|
||||||
for file in $exes; do
|
for file in $exes; do
|
||||||
echo "marking *$file*"
|
echo "marking *$file*"
|
||||||
paxmark ${paxflags} "$file"
|
paxmark ${paxflags} "$file"
|
||||||
done
|
done
|
||||||
|
|
||||||
# Remove duplicate binaries.
|
|
||||||
for i in $(cd $out/lib/openjdk/bin && echo *); do
|
|
||||||
if [ "$i" = java ]; then continue; fi
|
|
||||||
if cmp -s $out/lib/openjdk/bin/$i $jre/lib/openjdk/jre/bin/$i; then
|
|
||||||
ln -sfn $jre/lib/openjdk/jre/bin/$i $out/lib/openjdk/bin/$i
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
ln -s $out/lib/openjdk/bin $out/bin
|
ln -s $out/lib/openjdk/bin $out/bin
|
||||||
ln -s $jre/lib/openjdk/jre/bin $jre/bin
|
|
||||||
ln -s $jre/lib/openjdk/jre $out/jre
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# FIXME: this is unnecessary once the multiple-outputs branch is merged.
|
|
||||||
preFixup = ''
|
preFixup = ''
|
||||||
prefix=$jre stripDirs "$STRIP" "$stripDebugList" "''${stripDebugFlags:--S}"
|
# Propagate the setJavaClassPath setup hook so that any package
|
||||||
patchELF $jre
|
# that depends on the JDK has $CLASSPATH set up properly.
|
||||||
propagatedBuildInputs+=" $jre"
|
mkdir -p $out/nix-support
|
||||||
|
|
||||||
# Propagate the setJavaClassPath setup hook from the JRE so that
|
|
||||||
# any package that depends on the JRE has $CLASSPATH set up
|
|
||||||
# properly.
|
|
||||||
mkdir -p $jre/nix-support
|
|
||||||
#TODO or printWords? cf https://github.com/NixOS/nixpkgs/pull/27427#issuecomment-317293040
|
#TODO or printWords? cf https://github.com/NixOS/nixpkgs/pull/27427#issuecomment-317293040
|
||||||
echo -n "${setJavaClassPath}" > $jre/nix-support/propagated-build-inputs
|
echo -n "${setJavaClassPath}" > $out/nix-support/propagated-build-inputs
|
||||||
|
|
||||||
# Set JAVA_HOME automatically.
|
# Set JAVA_HOME automatically.
|
||||||
mkdir -p $out/nix-support
|
mkdir -p $out/nix-support
|
||||||
@ -196,7 +166,7 @@ let
|
|||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
inherit architecture;
|
inherit architecture;
|
||||||
home = "${openjdk10}/lib/openjdk";
|
home = "${openjdk}/lib/openjdk";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in openjdk10
|
in openjdk
|
@ -16,12 +16,12 @@ let
|
|||||||
src = if stdenv.hostPlatform.system == "x86_64-linux" then
|
src = if stdenv.hostPlatform.system == "x86_64-linux" then
|
||||||
(if version == "10" then fetchboot "10" "x86_64" "08085fsxc1qhqiv3yi38w8lrg3vm7s0m2yvnwr1c92v019806yq2"
|
(if version == "10" then fetchboot "10" "x86_64" "08085fsxc1qhqiv3yi38w8lrg3vm7s0m2yvnwr1c92v019806yq2"
|
||||||
else if version == "8" then fetchboot "8" "x86_64" "18zqx6jhm3lizn9hh6ryyqc9dz3i96pwaz8f6nxfllk70qi5gvks"
|
else if version == "8" then fetchboot "8" "x86_64" "18zqx6jhm3lizn9hh6ryyqc9dz3i96pwaz8f6nxfllk70qi5gvks"
|
||||||
else throw "No bootstrap for version")
|
else throw "No bootstrap jdk for version ${version}")
|
||||||
else if stdenv.hostPlatform.system == "i686-linux" then
|
else if stdenv.hostPlatform.system == "i686-linux" then
|
||||||
(if version == "10" then fetchboot "10" "i686" "1blb9gyzp8gfyggxvggqgpcgfcyi00ndnnskipwgdm031qva94p7"
|
(if version == "10" then fetchboot "10" "i686" "1blb9gyzp8gfyggxvggqgpcgfcyi00ndnnskipwgdm031qva94p7"
|
||||||
else if version == "8" then fetchboot "8" "i686" "1yx04xh8bqz7amg12d13rw5vwa008rav59mxjw1b9s6ynkvfgqq9"
|
else if version == "8" then fetchboot "8" "i686" "1yx04xh8bqz7amg12d13rw5vwa008rav59mxjw1b9s6ynkvfgqq9"
|
||||||
else throw "No bootstrap for version")
|
else throw "No bootstrap for version")
|
||||||
else throw "No bootstrap for system";
|
else throw "No bootstrap jdk for system ${stdenv.hostPlatform.system}";
|
||||||
|
|
||||||
bootstrap = runCommand "openjdk-bootstrap" {
|
bootstrap = runCommand "openjdk-bootstrap" {
|
||||||
passthru.home = "${bootstrap}/lib/openjdk";
|
passthru.home = "${bootstrap}/lib/openjdk";
|
||||||
|
@ -6,13 +6,13 @@ let
|
|||||||
sha256 = "0nk7m0lgcbsvldq2wbfni2pzq8h818523z912i7v8hdcij5s48c0";
|
sha256 = "0nk7m0lgcbsvldq2wbfni2pzq8h818523z912i7v8hdcij5s48c0";
|
||||||
};
|
};
|
||||||
|
|
||||||
jdk = stdenv.mkDerivation {
|
jdk = stdenv.mkDerivation rec {
|
||||||
name = "zulu10.3+5-jdk10";
|
name = "zulu11.2.3-jdk11.0.1";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = https://cdn.azul.com/zulu/bin/zulu10.3+5-jdk10.0.2-macosx_x64.zip;
|
url = "https://cdn.azul.com/zulu/bin/${name}-macosx_x64.tar.gz";
|
||||||
sha256 = "05pxfjn8fqw6ddr8m5hzyphwzqgrq8w6b4h3lwc1s7ymh05xmspz";
|
sha256 = "1jxnxmy79inwf3146ygry1mzv3dj6yrzqll16j7dpr91x1p3dpqy";
|
||||||
curlOpts = "-H Referer:https://www.azul.com/downloads/zulu/zulu-linux/";
|
curlOpts = "-H Referer:https://www.azul.com/downloads/zulu/zulu-mac/";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ unzip freetype ];
|
buildInputs = [ unzip freetype ];
|
||||||
@ -34,8 +34,8 @@ let
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
preFixup = ''
|
preFixup = ''
|
||||||
# Propagate the setJavaClassPath setup hook from the JRE so that
|
# Propagate the setJavaClassPath setup hook from the JDK so that
|
||||||
# any package that depends on the JRE has $CLASSPATH set up
|
# any package that depends on the JDK has $CLASSPATH set up
|
||||||
# properly.
|
# properly.
|
||||||
mkdir -p $out/nix-support
|
mkdir -p $out/nix-support
|
||||||
printWords ${setJavaClassPath} > $out/nix-support/propagated-build-inputs
|
printWords ${setJavaClassPath} > $out/nix-support/propagated-build-inputs
|
||||||
@ -49,7 +49,6 @@ let
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
jre = jdk;
|
|
||||||
home = jdk;
|
home = jdk;
|
||||||
};
|
};
|
||||||
|
|
@ -6976,11 +6976,11 @@ with pkgs;
|
|||||||
inherit (gnome2) GConf gnome_vfs;
|
inherit (gnome2) GConf gnome_vfs;
|
||||||
};
|
};
|
||||||
|
|
||||||
openjdk10 =
|
openjdk11 =
|
||||||
if stdenv.isDarwin then
|
if stdenv.isDarwin then
|
||||||
callPackage ../development/compilers/openjdk/darwin/10.nix { }
|
callPackage ../development/compilers/openjdk/darwin/11.nix { }
|
||||||
else
|
else
|
||||||
callPackage ../development/compilers/openjdk/10.nix {
|
callPackage ../development/compilers/openjdk/11.nix {
|
||||||
inherit (gnome2) GConf gnome_vfs;
|
inherit (gnome2) GConf gnome_vfs;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -7000,17 +7000,14 @@ with pkgs;
|
|||||||
(lib.addMetaAttrs { outputsToInstall = [ "jre" ]; }
|
(lib.addMetaAttrs { outputsToInstall = [ "jre" ]; }
|
||||||
((openjdk8.override { minimal = true; }).jre // { outputs = [ "jre" ]; }));
|
((openjdk8.override { minimal = true; }).jre // { outputs = [ "jre" ]; }));
|
||||||
|
|
||||||
jdk10 = openjdk10 // { outputs = [ "out" ]; };
|
jdk11 = openjdk11 // { outputs = [ "out" ]; };
|
||||||
jre10 = lib.setName "openjre-${lib.getVersion pkgs.openjdk10.jre}"
|
jdk11_headless =
|
||||||
(lib.addMetaAttrs { outputsToInstall = [ "jre" ]; }
|
|
||||||
(openjdk10.jre // { outputs = [ "jre" ]; }));
|
|
||||||
jre10_headless =
|
|
||||||
if stdenv.isDarwin then
|
if stdenv.isDarwin then
|
||||||
jre10
|
jdk11
|
||||||
else
|
else
|
||||||
lib.setName "openjre-${lib.getVersion pkgs.openjdk10.jre}-headless"
|
lib.setName "openjdk-${lib.getVersion pkgs.openjdk11}-headless"
|
||||||
(lib.addMetaAttrs { outputsToInstall = [ "jre" ]; }
|
(lib.addMetaAttrs {}
|
||||||
((openjdk10.override { minimal = true; }).jre // { outputs = [ "jre" ]; }));
|
((openjdk11.override { minimal = true; }) // {}));
|
||||||
|
|
||||||
jdk = jdk8;
|
jdk = jdk8;
|
||||||
jre = jre8;
|
jre = jre8;
|
||||||
@ -8133,10 +8130,10 @@ with pkgs;
|
|||||||
inherit (darwin) cctools;
|
inherit (darwin) cctools;
|
||||||
inherit (darwin.apple_sdk.frameworks) CoreFoundation CoreServices Foundation;
|
inherit (darwin.apple_sdk.frameworks) CoreFoundation CoreServices Foundation;
|
||||||
};
|
};
|
||||||
bazel_jdk10 = callPackage ../development/tools/build-managers/bazel {
|
bazel_jdk11 = callPackage ../development/tools/build-managers/bazel {
|
||||||
inherit (darwin) cctools;
|
inherit (darwin) cctools;
|
||||||
inherit (darwin.apple_sdk.frameworks) CoreFoundation CoreServices Foundation;
|
inherit (darwin.apple_sdk.frameworks) CoreFoundation CoreServices Foundation;
|
||||||
runJdk = jdk10;
|
runJdk = jdk11;
|
||||||
};
|
};
|
||||||
|
|
||||||
bazel-buildtools = callPackage ../development/tools/build-managers/bazel/buildtools { };
|
bazel-buildtools = callPackage ../development/tools/build-managers/bazel/buildtools { };
|
||||||
@ -16285,7 +16282,7 @@ with pkgs;
|
|||||||
eaglemode = callPackage ../applications/misc/eaglemode { };
|
eaglemode = callPackage ../applications/misc/eaglemode { };
|
||||||
|
|
||||||
eclipses = recurseIntoAttrs (callPackage ../applications/editors/eclipse {
|
eclipses = recurseIntoAttrs (callPackage ../applications/editors/eclipse {
|
||||||
jdk = jdk10;
|
jdk = jdk11;
|
||||||
});
|
});
|
||||||
|
|
||||||
ecs-agent = callPackage ../applications/virtualization/ecs-agent { };
|
ecs-agent = callPackage ../applications/virtualization/ecs-agent { };
|
||||||
|
Loading…
Reference in New Issue
Block a user