summary refs log tree commit diff
path: root/pkgs/development/compilers/openjdk
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/compilers/openjdk')
-rw-r--r--pkgs/development/compilers/openjdk/11.nix (renamed from pkgs/development/compilers/openjdk/10.nix)70
-rw-r--r--pkgs/development/compilers/openjdk/bootstrap.nix4
-rw-r--r--pkgs/development/compilers/openjdk/darwin/11.nix (renamed from pkgs/development/compilers/openjdk/darwin/10.nix)15
3 files changed, 29 insertions, 60 deletions
diff --git a/pkgs/development/compilers/openjdk/10.nix b/pkgs/development/compilers/openjdk/11.nix
index 1c125fac62f1..e2d89f3ef728 100644
--- a/pkgs/development/compilers/openjdk/10.nix
+++ b/pkgs/development/compilers/openjdk/11.nix
@@ -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
 , libX11, libICE, libXrender, libXext, libXt, libXtst, libXi, libXinerama, libXcursor, libXrandr
 , libjpeg, giflib
@@ -10,31 +10,30 @@
 let
 
   /**
-   * The JRE libraries are in directories that depend on the CPU.
+   * The JDK libraries are in directories that depend on the CPU.
    */
   architecture =
     if stdenv.hostPlatform.system == "i686-linux" then
       "i386"
     else "amd64";
 
-  update = "10.0.2";
+  major = "11";
+  update = ".0.1";
   build = "13";
-  repover = "jdk-${update}+${build}";
+  repover = "jdk-${major}${update}+${build}";
   paxflags = if stdenv.isi686 then "msp" else "m";
 
-  openjdk10 = stdenv.mkDerivation {
-    name = "openjdk-${update}-b${build}";
+  openjdk = stdenv.mkDerivation {
+    name = "openjdk-${major}${update}-b${build}";
 
     src = fetchurl {
-      url = "http://hg.openjdk.java.net/jdk-updates/jdk10u/archive/${repover}.tar.gz";
-      sha256 = "0y7hyzgvn6z8gyp3h9xvxwj6zda899y6i629jn6yxqzj96q56jpk";
+      url = "http://hg.openjdk.java.net/jdk-updates/jdk${major}u/archive/${repover}.tar.gz";
+      sha256 = "1ri3fv67rvs9xxhc3ynklbprhxbdsgpwafbw6wqj950xy5crgysm";
     };
 
-    outputs = [ "out" "jre" ];
-
     nativeBuildInputs = [ pkgconfig ];
     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
       libXi libXinerama libXcursor libXrandr lndir fontconfig
     ] ++ lib.optionals (!minimal && enableGnome2) [
@@ -55,12 +54,11 @@ let
 
       configureFlagsArray=(
         "--with-boot-jdk=${bootjdk.home}"
-        "--with-update-version=${update}"
+        "--with-update-version=${major}${update}"
         "--with-build-number=${build}"
         "--with-milestone=fcs"
         "--enable-unlimited-crypto"
         "--disable-debug-symbols"
-        "--disable-freetype-bundling"
         "--with-zlib=system"
         "--with-giflib=system"
         "--with-stdc++lib=dynamic"
@@ -86,7 +84,7 @@ let
     buildFlags = [ "all" ];
 
     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
 
@@ -101,57 +99,29 @@ let
       # jni.h expects jni_md.h to be in the header search path.
       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.
       rm -rf $out/lib/openjdk/demo
       ${lib.optionalString minimal ''
-        for d in $out/lib/openjdk/lib $jre/lib/openjdk/jre/lib; do
-          rm ''${d}/{libjsound,libjsoundalsa,libfontmanager}.so
-        done
+        rm $out/lib/openjdk/lib/{libjsound,libfontmanager}.so
       ''}
 
-      lndir $jre/lib/openjdk/jre $out/lib/openjdk/jre
-
       # 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*"
       for file in $exes; do
         echo "marking *$file*"
         paxmark ${paxflags} "$file"
       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 $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 = ''
-      prefix=$jre stripDirs "$STRIP" "$stripDebugList" "''${stripDebugFlags:--S}"
-      patchELF $jre
-      propagatedBuildInputs+=" $jre"
-
-      # 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
+      # Propagate the setJavaClassPath setup hook so that any package
+      # that depends on the JDK has $CLASSPATH set up properly.
+      mkdir -p $out/nix-support
       #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.
       mkdir -p $out/nix-support
@@ -196,7 +166,7 @@ let
 
     passthru = {
       inherit architecture;
-      home = "${openjdk10}/lib/openjdk";
+      home = "${openjdk}/lib/openjdk";
     };
   };
-in openjdk10
+in openjdk
diff --git a/pkgs/development/compilers/openjdk/bootstrap.nix b/pkgs/development/compilers/openjdk/bootstrap.nix
index 612f0db05821..1b20ca6cc606 100644
--- a/pkgs/development/compilers/openjdk/bootstrap.nix
+++ b/pkgs/development/compilers/openjdk/bootstrap.nix
@@ -16,12 +16,12 @@ let
   src = if stdenv.hostPlatform.system == "x86_64-linux" then
     (if version == "10"    then fetchboot "10" "x86_64" "08085fsxc1qhqiv3yi38w8lrg3vm7s0m2yvnwr1c92v019806yq2"
     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
     (if version == "10"    then fetchboot "10" "i686" "1blb9gyzp8gfyggxvggqgpcgfcyi00ndnnskipwgdm031qva94p7"
     else if version == "8" then fetchboot "8"  "i686" "1yx04xh8bqz7amg12d13rw5vwa008rav59mxjw1b9s6ynkvfgqq9"
     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" {
     passthru.home = "${bootstrap}/lib/openjdk";
diff --git a/pkgs/development/compilers/openjdk/darwin/10.nix b/pkgs/development/compilers/openjdk/darwin/11.nix
index 4969c12bff26..61c2d57423e4 100644
--- a/pkgs/development/compilers/openjdk/darwin/10.nix
+++ b/pkgs/development/compilers/openjdk/darwin/11.nix
@@ -6,13 +6,13 @@ let
     sha256 = "0nk7m0lgcbsvldq2wbfni2pzq8h818523z912i7v8hdcij5s48c0";
   };
 
-  jdk = stdenv.mkDerivation {
-    name = "zulu10.3+5-jdk10";
+  jdk = stdenv.mkDerivation rec {
+    name = "zulu11.2.3-jdk11.0.1";
 
     src = fetchurl {
-      url = https://cdn.azul.com/zulu/bin/zulu10.3+5-jdk10.0.2-macosx_x64.zip;
-      sha256 = "05pxfjn8fqw6ddr8m5hzyphwzqgrq8w6b4h3lwc1s7ymh05xmspz";
-      curlOpts = "-H Referer:https://www.azul.com/downloads/zulu/zulu-linux/";
+      url = "https://cdn.azul.com/zulu/bin/${name}-macosx_x64.tar.gz";
+      sha256 = "1jxnxmy79inwf3146ygry1mzv3dj6yrzqll16j7dpr91x1p3dpqy";
+      curlOpts = "-H Referer:https://www.azul.com/downloads/zulu/zulu-mac/";
     };
 
     buildInputs = [ unzip freetype ];
@@ -34,8 +34,8 @@ let
     '';
 
     preFixup = ''
-      # Propagate the setJavaClassPath setup hook from the JRE so that
-      # any package that depends on the JRE has $CLASSPATH set up
+      # Propagate the setJavaClassPath setup hook from the JDK so that
+      # any package that depends on the JDK has $CLASSPATH set up
       # properly.
       mkdir -p $out/nix-support
       printWords ${setJavaClassPath} > $out/nix-support/propagated-build-inputs
@@ -49,7 +49,6 @@ let
     '';
 
     passthru = {
-      jre = jdk;
       home = jdk;
     };