about summary refs log tree commit diff
path: root/pkgs/development/compilers
diff options
context:
space:
mode:
authorMatthew Justin Bauer <mjbauer95@gmail.com>2016-12-13 02:47:50 -0600
committerDaiderd Jordan <daiderd@gmail.com>2016-12-13 09:47:50 +0100
commitfd2cf186b0012c0d7a941d1984b987ddb87cf95d (patch)
tree3034d29d049109f3e8e112462b4affbdd6b88fc7 /pkgs/development/compilers
parentfa613c7dddff41c1f588c65e891e766a127ee732 (diff)
downloadnixlib-fd2cf186b0012c0d7a941d1984b987ddb87cf95d.tar
nixlib-fd2cf186b0012c0d7a941d1984b987ddb87cf95d.tar.gz
nixlib-fd2cf186b0012c0d7a941d1984b987ddb87cf95d.tar.bz2
nixlib-fd2cf186b0012c0d7a941d1984b987ddb87cf95d.tar.lz
nixlib-fd2cf186b0012c0d7a941d1984b987ddb87cf95d.tar.xz
nixlib-fd2cf186b0012c0d7a941d1984b987ddb87cf95d.tar.zst
nixlib-fd2cf186b0012c0d7a941d1984b987ddb87cf95d.zip
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.
Diffstat (limited to 'pkgs/development/compilers')
-rw-r--r--pkgs/development/compilers/openjdk-darwin/8.nix6
-rw-r--r--pkgs/development/compilers/openjdk-darwin/default.nix6
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 <<EOF >> $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 <<EOF >> $out/nix-support/setup-hook
       if [ -z "\$JAVA_HOME" ]; then export JAVA_HOME=$out; fi