From fd2cf186b0012c0d7a941d1984b987ddb87cf95d Mon Sep 17 00:00:00 2001 From: Matthew Justin Bauer Date: Tue, 13 Dec 2016 02:47:50 -0600 Subject: [PATCH] openjdk-darwin: Fix libfreetype path (#21089) The freetype path was not working. This fixes it to use the nix freetype version with install_name_tool. --- pkgs/development/compilers/openjdk-darwin/8.nix | 6 ++++-- pkgs/development/compilers/openjdk-darwin/default.nix | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/pkgs/development/compilers/openjdk-darwin/8.nix b/pkgs/development/compilers/openjdk-darwin/8.nix index bcafca16022e..1d12d59998a1 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 e43563fd60d9..10a9eb2b3666 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