graalvm8-ee: 19.2.1 -> 19.3.0, graalvm11-ee: init at 19.3.0

This commit is contained in:
volth 2019-11-24 04:03:23 +00:00
parent 542116a47f
commit bfcbe61076
2 changed files with 154 additions and 118 deletions

View File

@ -1,28 +1,38 @@
{ stdenv, requireFile, perl, unzip, glibc, zlib, gdk-pixbuf, xorg, glib, fontconfig, freetype, cairo, pango, gtk3, gtk2, ffmpeg, libGL, atk, alsaLib, libav_0_8, setJavaClassPath }: { stdenv, requireFile, perl, unzip, glibc, zlib, bzip2, gdk-pixbuf, xorg, glib, fontconfig, freetype, cairo, pango, gtk3, gtk2, ffmpeg, libGL, atk, alsaLib, libav_0_8, setJavaClassPath }:
let let
graalvm8-ee = stdenv.mkDerivation rec { common = javaVersion:
pname = "graalvm8-ee"; let
version = "19.2.0"; graalvmXXX-ee = stdenv.mkDerivation rec {
pname = "graalvm${javaVersion}-ee";
version = "19.3.0";
srcs = [ srcs = [
(requireFile { (requireFile {
name = "graalvm-ee-linux-amd64-${version}.tar.gz"; name = "graalvm-ee-java${javaVersion}-linux-amd64-${version}.tar.gz";
sha256 = "1j56lyids48zyjhxk8xl4niy8hk6qzi1aj7c55yfh62id8v6cpbw"; sha256 = { "8" = "dae766424457faea3bd2d7179477bab8dc073d92755ad09c51eee55ce5cb8b78";
"11" = "aced0251642e942081aa386a05656bab84984999ced296b4e001ae982ac3842d";
}.${javaVersion};
url = "https://www.oracle.com/technetwork/graalvm/downloads/index.html"; url = "https://www.oracle.com/technetwork/graalvm/downloads/index.html";
}) })
(requireFile { (requireFile {
name = "native-image-installable-svm-svmee-linux-amd64-${version}.jar"; name = "native-image-installable-svm-svmee-java${javaVersion}-linux-amd64-${version}.jar";
sha256 = "07c25l27msxccqrbz4bknz0sxsl0z2k8990cdfkbrgxvhxspfnnm"; sha256 = { "8" = "92fc421c8a07c7794179c96489ddf29d755d0a81ead2056fbf47fa137dbefc69";
"11" = "fe6363ecfe919d3575607276ac6541a4f0d29cd740424b3ea7fadd26c5915106";
}.${javaVersion};
url = "https://www.oracle.com/technetwork/graalvm/downloads/index.html"; url = "https://www.oracle.com/technetwork/graalvm/downloads/index.html";
}) })
(requireFile { (requireFile {
name = "python-installable-svm-svmee-linux-amd64-${version}.jar"; name = "python-installable-svm-svmee-java${javaVersion}-linux-amd64-${version}.jar";
sha256 = "1c7kpz56w9p418li97ymixdwywscr85vhn7jkzxq71bj7ia7pxwz"; sha256 = { "8" = "2668c44a6939393983fd941fc1c5573f49a349fc0cf919f6cd0ae98b7e8fac56";
"11" = "f148e1c2b78614b77ffc8c4292f62f21377e67f7359b8505fe6331d41e5a1a75";
}.${javaVersion};
url = "https://www.oracle.com/technetwork/graalvm/downloads/index.html"; url = "https://www.oracle.com/technetwork/graalvm/downloads/index.html";
}) })
(requireFile { (requireFile {
name = "ruby-installable-svm-svmee-linux-amd64-${version}.jar"; name = "ruby-installable-svm-svmee-java${javaVersion}-linux-amd64-${version}.jar";
sha256 = "13jfm5qpxqxz7f5n9yyvqrv1vwigifrjwk3hssp23maski2ssys1"; sha256 = { "8" = "e5f5938b9f55bde3f8b4e0f48f52cbb79a8668b53bbf96ab89b1da8d85bdfa90";
"11" = "2481b6e2644d302c190a898e58a21cda1aa32e473d12775217a6dd4d919413ea";
}.${javaVersion};
url = "https://www.oracle.com/technetwork/graalvm/downloads/index.html"; url = "https://www.oracle.com/technetwork/graalvm/downloads/index.html";
}) })
]; ];
@ -54,7 +64,8 @@ let
unpack_jar ''${arr[3]} unpack_jar ''${arr[3]}
''; '';
installPhase = '' installPhase = {
"8" = ''
# BUG workaround http://mail.openjdk.java.net/pipermail/graal-dev/2017-December/005141.html # BUG workaround http://mail.openjdk.java.net/pipermail/graal-dev/2017-December/005141.html
substituteInPlace $out/jre/lib/security/java.security \ substituteInPlace $out/jre/lib/security/java.security \
--replace file:/dev/random file:/dev/./urandom \ --replace file:/dev/random file:/dev/./urandom \
@ -64,10 +75,26 @@ let
for f in ${glibc}/lib/* ${glibc.static}/lib/* ${zlib.static}/lib/*; do for f in ${glibc}/lib/* ${glibc.static}/lib/* ${zlib.static}/lib/*; do
ln -s $f $out/jre/lib/svm/clibraries/linux-amd64/$(basename $f) ln -s $f $out/jre/lib/svm/clibraries/linux-amd64/$(basename $f)
done done
# allow using external truffle-api.jar and languages not included in the distrubution
rm $out/jre/lib/jvmci/parentClassLoader.classpath
''; '';
"11" = ''
# BUG workaround http://mail.openjdk.java.net/pipermail/graal-dev/2017-December/005141.html
substituteInPlace $out/conf/security/java.security \
--replace file:/dev/random file:/dev/./urandom \
--replace NativePRNGBlocking SHA1PRNG
# provide libraries needed for static compilation
for f in ${glibc}/lib/* ${glibc.static}/lib/* ${zlib.static}/lib/*; do
ln -s $f $out/lib/svm/clibraries/linux-amd64/$(basename $f)
done
'';
}.${javaVersion};
dontStrip = true; dontStrip = true;
# copy-paste openjdk's preFixup
preFixup = '' preFixup = ''
# Set JAVA_HOME automatically. # Set JAVA_HOME automatically.
mkdir -p $out/nix-support mkdir -p $out/nix-support
@ -77,9 +104,12 @@ let
''; '';
postFixup = '' postFixup = ''
rpath="$out/jre/lib/amd64/jli:$out/jre/lib/amd64/server:$out/jre/lib/amd64:${ rpath="${ { "8" = "$out/jre/lib/amd64/jli:$out/jre/lib/amd64/server:$out/jre/lib/amd64";
"11" = "$out/lib/jli:$out/lib/server:$out/lib";
}.${javaVersion}
}:${
stdenv.lib.strings.makeLibraryPath [ glibc xorg.libXxf86vm xorg.libX11 xorg.libXext xorg.libXtst xorg.libXi xorg.libXrender stdenv.lib.strings.makeLibraryPath [ glibc xorg.libXxf86vm xorg.libX11 xorg.libXext xorg.libXtst xorg.libXi xorg.libXrender
glib zlib alsaLib fontconfig freetype pango gtk3 gtk2 cairo gdk-pixbuf atk ffmpeg libGL ]}" glib zlib bzip2 alsaLib fontconfig freetype pango gtk3 gtk2 cairo gdk-pixbuf atk ffmpeg libGL ]}"
for f in $(find $out -type f -perm -0100); do for f in $(find $out -type f -perm -0100); do
patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$f" || true patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$f" || true
@ -119,7 +149,7 @@ let
./helloworld | fgrep 'Hello World' ./helloworld | fgrep 'Hello World'
''; '';
passthru.home = graalvm8-ee; passthru.home = graalvmXXX-ee;
meta = with stdenv.lib; { meta = with stdenv.lib; {
homepage = https://www.graalvm.org/; homepage = https://www.graalvm.org/;
@ -130,4 +160,8 @@ let
}; };
}; };
in in
graalvm8-ee graalvmXXX-ee;
in {
graalvm8-ee = common "8";
graalvm11-ee = common "11";
}

View File

@ -8295,7 +8295,9 @@ in
inherit (callPackages ../development/compilers/graalvm { }) mx jvmci8 graalvm8; inherit (callPackages ../development/compilers/graalvm { }) mx jvmci8 graalvm8;
graalvm8-ee = callPackage ../development/compilers/graalvm/enterprise-edition.nix { }; inherit (callPackages ../development/compilers/graalvm/enterprise-edition.nix { })
graalvm8-ee
graalvm11-ee;
openshot-qt = libsForQt5.callPackage ../applications/video/openshot-qt { }; openshot-qt = libsForQt5.callPackage ../applications/video/openshot-qt { };