nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix

openjdk8: work around gnupatch latest feature of not following symlinks, even when --follow-symlinks is specified.

+23 -3
+15
pkgs/development/compilers/openjdk/fix-java-home-jdk8.patch
··· 1 + --- a/hotspot/src/os/linux/vm/os_linux.cpp 2015-02-04 21:14:39.000000000 +0100 2 + +++ b/hotspot/src/os/linux/vm/os_linux.cpp 2015-05-19 16:17:29.960107613 +0200 3 + @@ -2304,10 +2304,8 @@ 4 + assert(ret, "cannot locate libjvm"); 5 + char *rp = NULL; 6 + if (ret && dli_fname[0] != '\0') { 7 + - rp = realpath(dli_fname, buf); 8 + + snprintf(buf, buflen, "%s", dli_fname); 9 + } 10 + - if (rp == NULL) 11 + - return; 12 + 13 + if (Arguments::created_by_gamma_launcher()) { 14 + // Support for the gamma launcher. Typical value for buf is 15 +
+8 -3
pkgs/development/compilers/openjdk/openjdk8.nix
··· 50 50 ''; 51 51 prePatch = '' 52 52 # despite --with-override-jdk the build still searchs here 53 - ln -s "../jdk-${repover}" "jdk"; 54 - ln -s "../hotspot-${repover}" "hotspot"; 53 + # GNU Patch bug, follow symlinks only follow the last symlink.. 54 + mv "../jdk-${repover}" "jdk"; 55 + mv "../hotspot-${repover}" "hotspot"; 56 + ''; 57 + postPatch = '' 58 + mv jdk "../jdk-${repover}"; 59 + mv hotspot "../hotspot-${repover}"; 55 60 ''; 56 61 patches = [ 57 - ./fix-java-home.patch 62 + ./fix-java-home-jdk8.patch 58 63 ./read-truststore-from-env-jdk8.patch 59 64 ./currency-date-range-jdk8.patch 60 65 ];