diff --git a/pkgs/development/compilers/openjdk-darwin/8.nix b/pkgs/development/compilers/openjdk-darwin/8.nix index bcafca16022..1d12d59998a 100644 --- a/pkgs/development/compilers/openjdk-darwin/8.nix +++ b/pkgs/development/compilers/openjdk-darwin/8.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, unzip, setJavaClassPath }: +{ stdenv, fetchurl, unzip, setJavaClassPath, freetype }: let jdk = stdenv.mkDerivation { name = "zulu1.8.0_66-8.11.0.1"; @@ -9,7 +9,7 @@ let curlOpts = "-H Referer:https://www.azul.com/downloads/zulu/zulu-linux/"; }; - buildInputs = [ unzip ]; + buildInputs = [ unzip freetype ]; installPhase = '' mkdir -p $out @@ -26,6 +26,8 @@ let mkdir -p $out/nix-support echo -n "${setJavaClassPath}" > $out/nix-support/propagated-native-build-inputs + install_name_tool -change /usr/X11/lib/libfreetype.6.dylib ${freetype}/lib/libfreetype.6.dylib $out/jre/lib/libfontmanager.dylib + # Set JAVA_HOME automatically. cat <> $out/nix-support/setup-hook if [ -z "\$JAVA_HOME" ]; then export JAVA_HOME=$out; fi diff --git a/pkgs/development/compilers/openjdk-darwin/default.nix b/pkgs/development/compilers/openjdk-darwin/default.nix index e43563fd60d..10a9eb2b366 100644 --- a/pkgs/development/compilers/openjdk-darwin/default.nix +++ b/pkgs/development/compilers/openjdk-darwin/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, unzip, setJavaClassPath }: +{ stdenv, fetchurl, unzip, setJavaClassPath, freetype }: let jdk = stdenv.mkDerivation { name = "openjdk-7u60b30"; @@ -9,7 +9,7 @@ let sha256 = "af510a4d566712d82c17054bb39f91d98c69a85586e244c6123669a0bd4b7401"; }; - buildInputs = [ unzip ]; + buildInputs = [ unzip freetype ]; installPhase = '' mv */Contents/Home $out @@ -25,6 +25,8 @@ let mkdir -p $out/nix-support echo -n "${setJavaClassPath}" > $out/nix-support/propagated-native-build-inputs + install_name_tool -change /usr/X11/lib/libfreetype.6.dylib ${freetype}/lib/libfreetype.6.dylib $out/jre/lib/libfontmanager.dylib + # Set JAVA_HOME automatically. cat <> $out/nix-support/setup-hook if [ -z "\$JAVA_HOME" ]; then export JAVA_HOME=$out; fi