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.
This commit is contained in:
parent
fa613c7ddd
commit
fd2cf186b0
@ -1,4 +1,4 @@
|
|||||||
{ stdenv, fetchurl, unzip, setJavaClassPath }:
|
{ stdenv, fetchurl, unzip, setJavaClassPath, freetype }:
|
||||||
let
|
let
|
||||||
jdk = stdenv.mkDerivation {
|
jdk = stdenv.mkDerivation {
|
||||||
name = "zulu1.8.0_66-8.11.0.1";
|
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/";
|
curlOpts = "-H Referer:https://www.azul.com/downloads/zulu/zulu-linux/";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ unzip ];
|
buildInputs = [ unzip freetype ];
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out
|
mkdir -p $out
|
||||||
@ -26,6 +26,8 @@ let
|
|||||||
mkdir -p $out/nix-support
|
mkdir -p $out/nix-support
|
||||||
echo -n "${setJavaClassPath}" > $out/nix-support/propagated-native-build-inputs
|
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.
|
# Set JAVA_HOME automatically.
|
||||||
cat <<EOF >> $out/nix-support/setup-hook
|
cat <<EOF >> $out/nix-support/setup-hook
|
||||||
if [ -z "\$JAVA_HOME" ]; then export JAVA_HOME=$out; fi
|
if [ -z "\$JAVA_HOME" ]; then export JAVA_HOME=$out; fi
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ stdenv, fetchurl, unzip, setJavaClassPath }:
|
{ stdenv, fetchurl, unzip, setJavaClassPath, freetype }:
|
||||||
let
|
let
|
||||||
jdk = stdenv.mkDerivation {
|
jdk = stdenv.mkDerivation {
|
||||||
name = "openjdk-7u60b30";
|
name = "openjdk-7u60b30";
|
||||||
@ -9,7 +9,7 @@ let
|
|||||||
sha256 = "af510a4d566712d82c17054bb39f91d98c69a85586e244c6123669a0bd4b7401";
|
sha256 = "af510a4d566712d82c17054bb39f91d98c69a85586e244c6123669a0bd4b7401";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ unzip ];
|
buildInputs = [ unzip freetype ];
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mv */Contents/Home $out
|
mv */Contents/Home $out
|
||||||
@ -25,6 +25,8 @@ let
|
|||||||
mkdir -p $out/nix-support
|
mkdir -p $out/nix-support
|
||||||
echo -n "${setJavaClassPath}" > $out/nix-support/propagated-native-build-inputs
|
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.
|
# Set JAVA_HOME automatically.
|
||||||
cat <<EOF >> $out/nix-support/setup-hook
|
cat <<EOF >> $out/nix-support/setup-hook
|
||||||
if [ -z "\$JAVA_HOME" ]; then export JAVA_HOME=$out; fi
|
if [ -z "\$JAVA_HOME" ]; then export JAVA_HOME=$out; fi
|
||||||
|
Loading…
Reference in New Issue
Block a user