summary refs log tree commit diff
path: root/pkgs/development/compilers/oraclejdk
diff options
context:
space:
mode:
authorJohn Doe <John Doe john@example.com>2017-12-04 16:52:44 +0000
committerTuomas Tynkkynen <tuomas.tynkkynen@iki.fi>2017-12-05 15:48:25 +0200
commitf38560a17b8cb8e43ac21ab906bba3579aff5b2d (patch)
tree1a0dbb826ddeba3a3e88ccc5b26df119f23c60d6 /pkgs/development/compilers/oraclejdk
parent5e191223b3e31ebae2c865e525a78f9f207afcb9 (diff)
downloadnixpkgs-f38560a17b8cb8e43ac21ab906bba3579aff5b2d.tar
nixpkgs-f38560a17b8cb8e43ac21ab906bba3579aff5b2d.tar.gz
nixpkgs-f38560a17b8cb8e43ac21ab906bba3579aff5b2d.tar.bz2
nixpkgs-f38560a17b8cb8e43ac21ab906bba3579aff5b2d.tar.lz
nixpkgs-f38560a17b8cb8e43ac21ab906bba3579aff5b2d.tar.xz
nixpkgs-f38560a17b8cb8e43ac21ab906bba3579aff5b2d.tar.zst
nixpkgs-f38560a17b8cb8e43ac21ab906bba3579aff5b2d.zip
oraclejdk8: support aarch64
[dezgeg amended the change to all-packages.nix]
Diffstat (limited to 'pkgs/development/compilers/oraclejdk')
-rw-r--r--pkgs/development/compilers/oraclejdk/jdk-linux-base.nix18
-rw-r--r--pkgs/development/compilers/oraclejdk/jdk8cpu-linux.nix1
-rw-r--r--pkgs/development/compilers/oraclejdk/jdk8psu-linux.nix1
3 files changed, 16 insertions, 4 deletions
diff --git a/pkgs/development/compilers/oraclejdk/jdk-linux-base.nix b/pkgs/development/compilers/oraclejdk/jdk-linux-base.nix
index c2866446f76..fadae3eb592 100644
--- a/pkgs/development/compilers/oraclejdk/jdk-linux-base.nix
+++ b/pkgs/development/compilers/oraclejdk/jdk-linux-base.nix
@@ -4,6 +4,7 @@
 , sha256_i686
 , sha256_x86_64
 , sha256_armv7l
+, sha256_aarch64
 , jceName
 , jceDownloadUrl
 , sha256JCE
@@ -38,11 +39,12 @@
 
 assert stdenv.system == "i686-linux"
     || stdenv.system == "x86_64-linux"
-    || stdenv.system == "armv7l-linux";
+    || stdenv.system == "armv7l-linux"
+    || stdenv.system == "aarch64-linux";
 assert swingSupport -> xorg != null;
 
 let
-  abortArch = abort "jdk requires i686-linux, x86_64-linux, or armv7l-linux";
+  abortArch = abort "jdk requires i686-linux, x86_64-linux, aarch64-linux or armv7l-linux";
 
   /**
    * The JRE libraries are in directories that depend on the CPU.
@@ -54,6 +56,8 @@ let
       "amd64"
     else if stdenv.system == "armv7l-linux" then
       "arm"
+    else if stdenv.system == "aarch64-linux" then
+      "aarch64"
     else
       abortArch;
 
@@ -99,6 +103,12 @@ let result = stdenv.mkDerivation rec {
         url = downloadUrl;
         sha256 = sha256_armv7l;
       }
+    else if stdenv.system == "aarch64-linux" then
+      requireFile {
+        name = "jdk-${productVersion}u${patchVersion}-linux-arm64-vfp-hflt.tar.gz";
+        url = downloadUrl;
+        sha256 = sha256_aarch64;
+      }
     else
       abortArch;
 
@@ -116,7 +126,7 @@ let result = stdenv.mkDerivation rec {
     # Set PaX markings
     exes=$(file $sourceRoot/bin/* $sourceRoot/jre/bin/* 2> /dev/null | grep -E 'ELF.*(executable|shared object)' | sed -e 's/: .*$//')
     for file in $exes; do
-      paxmark m "$file"
+      paxmark m "$file" || true
       # On x86 for heap sizes over 700MB disable SEGMEXEC and PAGEEXEC as well.
       ${stdenv.lib.optionalString stdenv.isi686 ''paxmark msp "$file"''}
     done
@@ -212,7 +222,7 @@ let result = stdenv.mkDerivation rec {
 
   meta = with stdenv.lib; {
     license = licenses.unfree;
-    platforms = [ "i686-linux" "x86_64-linux" "armv7l-linux" ]; # some inherit jre.meta.platforms
+    platforms = [ "i686-linux" "x86_64-linux" "armv7l-linux" "aarch64-linux" ]; # some inherit jre.meta.platforms
   };
 
 }; in result
diff --git a/pkgs/development/compilers/oraclejdk/jdk8cpu-linux.nix b/pkgs/development/compilers/oraclejdk/jdk8cpu-linux.nix
index f8f37160a26..8319d4396ac 100644
--- a/pkgs/development/compilers/oraclejdk/jdk8cpu-linux.nix
+++ b/pkgs/development/compilers/oraclejdk/jdk8cpu-linux.nix
@@ -5,6 +5,7 @@ import ./jdk-linux-base.nix {
   sha256_i686 = "0w1snn9hxwvdnk77frhdzbsm6v30v99dy5zmpy8ij7yxd57z6ql0";
   sha256_x86_64 = "0zq2dxbxmshz080yskhc8y2wbqi0y0kl9girxjbb4rwk837010n7";
   sha256_armv7l = "10r3nyssx8piyjaspravwgj2bnq4537041pn0lz4fk5b3473kgfb";
+  sha256_aarch64 = "1xva22cjjpwa95h7x3xzyymn1bgxp1q67j5j304kn6cqah4k31j1";
   jceName = "jce_policy-8.zip";
   jceDownloadUrl = http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html;
   sha256JCE = "0n8b6b8qmwb14lllk2lk1q1ahd3za9fnjigz5xn65mpg48whl0pk";
diff --git a/pkgs/development/compilers/oraclejdk/jdk8psu-linux.nix b/pkgs/development/compilers/oraclejdk/jdk8psu-linux.nix
index 863621bf6b0..dbb300c5f5f 100644
--- a/pkgs/development/compilers/oraclejdk/jdk8psu-linux.nix
+++ b/pkgs/development/compilers/oraclejdk/jdk8psu-linux.nix
@@ -5,6 +5,7 @@ import ./jdk-linux-base.nix {
   sha256_i686 = "0gjc7kcfx40f43z1w1qsn1fqxdz8d46wml2g11qgm55ishhv2q7w";
   sha256_x86_64 = "1gv1348hrgna9l3sssv3g9jzs37y1lkx05xq83chav9z1hs3p2r1";
   sha256_armv7l = "10r3nyssx8piyjaspravwgj2bnq4537041pn0lz4fk5b3473kgfb";
+  sha256_aarch64 = "13qpxa8nxsnikmm7h6ysnsdqg5vl8j7hzfa8kgh20z8a17fhj9kk";
   jceName = "jce_policy-8.zip";
   jceDownloadUrl = http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html;
   sha256JCE = "0n8b6b8qmwb14lllk2lk1q1ahd3za9fnjigz5xn65mpg48whl0pk";