From 5c014feb0a091fbd8b201a3734f91061190a40dc Mon Sep 17 00:00:00 2001 From: Luca Bruno Date: Thu, 3 Sep 2015 11:52:13 +0200 Subject: [PATCH] imagemagick: fix ghostscript reference in .la files --- pkgs/applications/graphics/ImageMagick/default.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/graphics/ImageMagick/default.nix b/pkgs/applications/graphics/ImageMagick/default.nix index 3575eee2939..c25cc11c203 100644 --- a/pkgs/applications/graphics/ImageMagick/default.nix +++ b/pkgs/applications/graphics/ImageMagick/default.nix @@ -40,7 +40,13 @@ stdenv.mkDerivation rec { propagatedBuildInputs = [ bzip2 freetype libjpeg libX11 libXext libXt lcms2 ]; - postInstall = ''(cd "$out/include" && ln -s ImageMagick* ImageMagick)''; + postInstall = '' + (cd "$out/include" && ln -s ImageMagick* ImageMagick) + '' + lib.optionalString (ghostscript != null) '' + for la in $out/lib/*.la; do + sed 's|-lgs|-L${ghostscript}/lib -lgs|' -i $la + done + ''; meta = with stdenv.lib; { homepage = http://www.imagemagick.org/;