about summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorvolth <volth@webmaster.ms>2019-06-21 11:04:42 +0000
committerHlöðver Sigurðsson <hlolli@gmail.com>2019-06-21 05:03:59 -0700
commitb8c22dc88da8fb821182ae1471ff45203b874e6d (patch)
treec56182b309e20461967f7f463afcdd1aea408592 /pkgs/development
parent4fb96fb1bb06342d61800f014bf2e0e047829c62 (diff)
downloadnixlib-b8c22dc88da8fb821182ae1471ff45203b874e6d.tar
nixlib-b8c22dc88da8fb821182ae1471ff45203b874e6d.tar.gz
nixlib-b8c22dc88da8fb821182ae1471ff45203b874e6d.tar.bz2
nixlib-b8c22dc88da8fb821182ae1471ff45203b874e6d.tar.lz
nixlib-b8c22dc88da8fb821182ae1471ff45203b874e6d.tar.xz
nixlib-b8c22dc88da8fb821182ae1471ff45203b874e6d.tar.zst
nixlib-b8c22dc88da8fb821182ae1471ff45203b874e6d.zip
graalvm8-19.0.0: minor fixes
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/compilers/graalvm/default.nix27
1 files changed, 19 insertions, 8 deletions
diff --git a/pkgs/development/compilers/graalvm/default.nix b/pkgs/development/compilers/graalvm/default.nix
index 741ce7aca744..2cf92b4e18ea 100644
--- a/pkgs/development/compilers/graalvm/default.nix
+++ b/pkgs/development/compilers/graalvm/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, lib, fetchFromGitHub, fetchurl, fetchzip, fetchgit, mercurial, python27,
+{ stdenv, lib, fetchFromGitHub, fetchurl, fetchzip, fetchgit, mercurial, python27, setJavaClassPath,
   zlib, makeWrapper, openjdk, unzip, git, clang, llvm, which, icu, ruby, bzip2, glibc
   # gfortran, readline, bzip2, lzma, pcre, curl, ed, tree ## WIP: fastr deps
 }:
@@ -267,8 +267,21 @@ in rec {
       mv openjdk1.8.0_*/linux-amd64/product/* $out
       install -v -m0555 -D $MX_CACHE_DIR/hsdis*/hsdis.so $out/jre/lib/amd64/hsdis-amd64.so
     '';
-    dontFixup = true; # do not nuke path of ffmpeg etc
-    dontStrip = true; # why? see in oraclejdk derivation
+    # copy-paste openjdk's preFixup
+    preFixup = ''
+      # Propagate the setJavaClassPath setup hook from the JRE so that
+      # any package that depends on the JRE has $CLASSPATH set up
+      # properly.
+      mkdir -p $out/nix-support
+      printWords ${setJavaClassPath} > $out/nix-support/propagated-build-inputs
+
+      # Set JAVA_HOME automatically.
+      mkdir -p $out/nix-support
+      cat <<EOF > $out/nix-support/setup-hook
+      if [ -z "\$JAVA_HOME" ]; then export JAVA_HOME=$out; fi
+      EOF
+    '';
+    dontStrip = true; # stripped javac crashes with "segmentaion fault"
     inherit (openjdk) meta;
     inherit (openjdk) postFixup;
   };
@@ -363,12 +376,10 @@ in rec {
       cp -rf ${glibc}/lib/* $out/jre/lib/svm/clibraries/linux-amd64/
       cp ${glibc.static}/lib/* $out/jre/lib/svm/clibraries/linux-amd64/
       cp ${zlib.static}/lib/libz.a $out/jre/lib/svm/clibraries/linux-amd64/libz.a
-      # Organize the out dir
-      mkdir -p $out/share && mv $out/man $out/share
     '';
 
-    dontFixup = true; # do not nuke path of ffmpeg etc
-    dontStrip = true; # why? see in oraclejdk derivation
+    inherit (jvmci8) preFixup;
+    dontStrip = true; # stripped javac crashes with "segmentaion fault"
     doInstallCheck = true;
     installCheckPhase = ''
       echo ${lib.escapeShellArg ''
@@ -403,7 +414,7 @@ in rec {
       description = "High-Performance Polyglot VM";
       license = licenses.gpl2;
       maintainers = with maintainers; [ volth hlolli ];
-      platforms = [ "x86_64-linux" ];
+      platforms = [ "x86_64-linux" "aarch64-linux" ];
     };
   };
 }