Skip to content

Commit

Permalink
openjdk-darwin: Fix libfreetype path (#21089)
Browse files Browse the repository at this point in the history
The freetype path was not working. This fixes it to use the nix
freetype version with install_name_tool.
  • Loading branch information
matthewbauer authored and LnL7 committed Dec 13, 2016
1 parent fa613c7 commit fd2cf18
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions 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";
Expand All @@ -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
Expand All @@ -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
Expand Down
6 changes: 4 additions & 2 deletions 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";
Expand All @@ -9,7 +9,7 @@ let
sha256 = "af510a4d566712d82c17054bb39f91d98c69a85586e244c6123669a0bd4b7401";
};

buildInputs = [ unzip ];
buildInputs = [ unzip freetype ];

installPhase = ''
mv */Contents/Home $out
Expand All @@ -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
Expand Down

0 comments on commit fd2cf18

Please sign in to comment.