Merge pull request #27419 from elitak/armjdk

oraclejdk8: armv7l support

authored by Jörg Thalheim and committed by GitHub d3ee993a b6f9047d

+43 -21
+37 -18
pkgs/development/compilers/oraclejdk/jdk-linux-base.nix
··· 3 , downloadUrl 4 , sha256_i686 5 , sha256_x86_64 6 , jceName 7 , jceDownloadUrl 8 , sha256JCE ··· 34 , setJavaClassPath 35 }: 36 37 - assert stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux"; 38 assert swingSupport -> xorg != null; 39 40 let 41 42 /** 43 * The JRE libraries are in directories that depend on the CPU. ··· 47 "i386" 48 else if stdenv.system == "x86_64-linux" then 49 "amd64" 50 else 51 - abort "jdk requires i686-linux or x86_64 linux"; 52 53 jce = 54 if installjce then ··· 59 } 60 else 61 ""; 62 in 63 64 let result = stdenv.mkDerivation rec { ··· 78 url = downloadUrl; 79 sha256 = sha256_x86_64; 80 } 81 else 82 - abort "jdk requires i686-linux or x86_64 linux"; 83 84 nativeBuildInputs = [ file ] 85 ++ stdenv.lib.optional installjce unzip; ··· 134 cp -v UnlimitedJCEPolicy*/*.jar $jrePath/lib/security 135 fi 136 137 - rpath=$rpath''${rpath:+:}$jrePath/lib/${architecture}/jli 138 - rpath=$rpath''${rpath:+:}$jrePath/lib/${architecture}/server 139 - rpath=$rpath''${rpath:+:}$jrePath/lib/${architecture}/xawt 140 - rpath=$rpath''${rpath:+:}$jrePath/lib/${architecture} 141 - 142 - # set all the dynamic linkers 143 - find $out -type f -perm -0100 \ 144 - -exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 145 - --set-rpath "$rpath" {} \; 146 - 147 - find $out -name "*.so" -exec patchelf --set-rpath "$rpath" {} \; 148 - 149 if test -z "$pluginSupport"; then 150 rm -f $out/bin/javaws 151 if test -n "$installjdk"; then ··· 163 cat <<EOF >> $out/nix-support/setup-hook 164 if [ -z "\$JAVA_HOME" ]; then export JAVA_HOME=$out; fi 165 EOF 166 167 # Oracle Java Mission Control needs to know where libgtk-x11 and related is 168 - if test -n "$installjdk"; then 169 wrapProgram "$out/bin/jmc" \ 170 - --suffix-each LD_LIBRARY_PATH ':' "${rpath}" 171 fi 172 ''; 173 ··· 192 193 meta = with stdenv.lib; { 194 license = licenses.unfree; 195 - platforms = [ "i686-linux" "x86_64-linux" ]; # some inherit jre.meta.platforms 196 }; 197 198 }; in result
··· 3 , downloadUrl 4 , sha256_i686 5 , sha256_x86_64 6 + , sha256_armv7l 7 , jceName 8 , jceDownloadUrl 9 , sha256JCE ··· 35 , setJavaClassPath 36 }: 37 38 + assert stdenv.system == "i686-linux" 39 + || stdenv.system == "x86_64-linux" 40 + || stdenv.system == "armv7l-linux"; 41 assert swingSupport -> xorg != null; 42 43 let 44 + abortArch = abort "jdk requires i686-linux, x86_64-linux, or armv7l-linux"; 45 46 /** 47 * The JRE libraries are in directories that depend on the CPU. ··· 51 "i386" 52 else if stdenv.system == "x86_64-linux" then 53 "amd64" 54 + else if stdenv.system == "armv7l-linux" then 55 + "arm" 56 else 57 + abortArch; 58 59 jce = 60 if installjce then ··· 65 } 66 else 67 ""; 68 + 69 + rSubPaths = [ 70 + "lib/${architecture}/jli" 71 + "lib/${architecture}/server" 72 + "lib/${architecture}/xawt" 73 + "lib/${architecture}" 74 + ]; 75 + 76 in 77 78 let result = stdenv.mkDerivation rec { ··· 92 url = downloadUrl; 93 sha256 = sha256_x86_64; 94 } 95 + else if stdenv.system == "armv7l-linux" then 96 + requireFile { 97 + name = "jdk-${productVersion}u${patchVersion}-linux-arm32-vfp-hflt.tar.gz"; 98 + url = downloadUrl; 99 + sha256 = sha256_armv7l; 100 + } 101 else 102 + abortArch; 103 104 nativeBuildInputs = [ file ] 105 ++ stdenv.lib.optional installjce unzip; ··· 154 cp -v UnlimitedJCEPolicy*/*.jar $jrePath/lib/security 155 fi 156 157 if test -z "$pluginSupport"; then 158 rm -f $out/bin/javaws 159 if test -n "$installjdk"; then ··· 171 cat <<EOF >> $out/nix-support/setup-hook 172 if [ -z "\$JAVA_HOME" ]; then export JAVA_HOME=$out; fi 173 EOF 174 + ''; 175 + 176 + postFixup = '' 177 + rpath+="''${rpath:+:}${stdenv.lib.concatStringsSep ":" (map (a: "$jrePath/${a}") rSubPaths)}" 178 + 179 + # set all the dynamic linkers 180 + find $out -type f -perm -0100 \ 181 + -exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ 182 + --set-rpath "$rpath" {} \; 183 + 184 + find $out -name "*.so" -exec patchelf --set-rpath "$rpath" {} \; 185 186 # Oracle Java Mission Control needs to know where libgtk-x11 and related is 187 + if test -n "$installjdk" -a -x $out/bin/jmc; then 188 wrapProgram "$out/bin/jmc" \ 189 + --suffix-each LD_LIBRARY_PATH ':' "$rpath" 190 fi 191 ''; 192 ··· 211 212 meta = with stdenv.lib; { 213 license = licenses.unfree; 214 + platforms = [ "i686-linux" "x86_64-linux" "armv7l-linux" ]; # some inherit jre.meta.platforms 215 }; 216 217 }; in result
+1
pkgs/development/compilers/oraclejdk/jdk8cpu-linux.nix
··· 4 downloadUrl = http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html; 5 sha256_i686 = "0m3i1n1im1nlwb06wlsdajv19cd3zhrjkw8zbyjfznydn6qs4s80"; 6 sha256_x86_64 = "0dhj623ya01glcl3iir9ajifcrf6awhvpk936x9cxfj8zfyibck2"; 7 jceName = "jce_policy-8.zip"; 8 jceDownloadUrl = http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html; 9 sha256JCE = "0n8b6b8qmwb14lllk2lk1q1ahd3za9fnjigz5xn65mpg48whl0pk";
··· 4 downloadUrl = http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html; 5 sha256_i686 = "0m3i1n1im1nlwb06wlsdajv19cd3zhrjkw8zbyjfznydn6qs4s80"; 6 sha256_x86_64 = "0dhj623ya01glcl3iir9ajifcrf6awhvpk936x9cxfj8zfyibck2"; 7 + sha256_armv7l = "0ja97nqn4x0ji16c7r6i9nnnj3745br7qlbj97jg1s8m2wk7f9jd"; 8 jceName = "jce_policy-8.zip"; 9 jceDownloadUrl = http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html; 10 sha256JCE = "0n8b6b8qmwb14lllk2lk1q1ahd3za9fnjigz5xn65mpg48whl0pk";
+1
pkgs/development/compilers/oraclejdk/jdk8psu-linux.nix
··· 4 downloadUrl = http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html; 5 sha256_i686 = "0m3i1n1im1nlwb06wlsdajv19cd3zhrjkw8zbyjfznydn6qs4s80"; 6 sha256_x86_64 = "0dhj623ya01glcl3iir9ajifcrf6awhvpk936x9cxfj8zfyibck2"; 7 jceName = "jce_policy-8.zip"; 8 jceDownloadUrl = http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html; 9 sha256JCE = "0n8b6b8qmwb14lllk2lk1q1ahd3za9fnjigz5xn65mpg48whl0pk";
··· 4 downloadUrl = http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html; 5 sha256_i686 = "0m3i1n1im1nlwb06wlsdajv19cd3zhrjkw8zbyjfznydn6qs4s80"; 6 sha256_x86_64 = "0dhj623ya01glcl3iir9ajifcrf6awhvpk936x9cxfj8zfyibck2"; 7 + sha256_armv7l = "0ja97nqn4x0ji16c7r6i9nnnj3745br7qlbj97jg1s8m2wk7f9jd"; 8 jceName = "jce_policy-8.zip"; 9 jceDownloadUrl = http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html; 10 sha256JCE = "0n8b6b8qmwb14lllk2lk1q1ahd3za9fnjigz5xn65mpg48whl0pk";
+4 -3
pkgs/top-level/all-packages.nix
··· 5621 (lib.addMetaAttrs { outputsToInstall = [ "jre" ]; } 5622 (openjdk7.jre // { outputs = [ "jre" ]; })); 5623 5624 - jdk8 = openjdk8 // { outputs = [ "out" ]; }; 5625 - jre8 = lib.setName "openjre-${lib.getVersion pkgs.openjdk8.jre}" 5626 (lib.addMetaAttrs { outputsToInstall = [ "jre" ]; } 5627 (openjdk8.jre // { outputs = [ "jre" ]; })); 5628 jre8_headless = ··· 5655 5656 supportsJDK = 5657 system == "i686-linux" || 5658 - system == "x86_64-linux"; 5659 5660 jdkdistro = oraclejdk8distro; 5661
··· 5621 (lib.addMetaAttrs { outputsToInstall = [ "jre" ]; } 5622 (openjdk7.jre // { outputs = [ "jre" ]; })); 5623 5624 + jdk8 = if stdenv.isArm then oraclejdk8 else openjdk8 // { outputs = [ "out" ]; }; 5625 + jre8 = if stdenv.isArm then oraclejre8 else lib.setName "openjre-${lib.getVersion pkgs.openjdk8.jre}" 5626 (lib.addMetaAttrs { outputsToInstall = [ "jre" ]; } 5627 (openjdk8.jre // { outputs = [ "jre" ]; })); 5628 jre8_headless = ··· 5655 5656 supportsJDK = 5657 system == "i686-linux" || 5658 + system == "x86_64-linux" || 5659 + system == "armv7l-linux"; 5660 5661 jdkdistro = oraclejdk8distro; 5662