diff --git a/pkgs/applications/graphics/ImageMagick/default.nix b/pkgs/applications/graphics/ImageMagick/default.nix index d66db51a4de..b96d1bc84f7 100644 --- a/pkgs/applications/graphics/ImageMagick/default.nix +++ b/pkgs/applications/graphics/ImageMagick/default.nix @@ -3,7 +3,7 @@ , bzip2 , freetype , graphviz -, ghostscript +, ghostscript ? null , libjpeg , libpng , libtiff @@ -27,16 +27,17 @@ stdenv.mkDerivation rec { sha256 = "0m0sa4jxsvm8pf9nfvkzlbzq13d1lj15lfz6jif12l6ywyh2c1cs"; }; - configureFlags = '' + configureFlags = "" + stdenv.lib.optionalString (ghostscript != null && stdenv.system != "x86_64-darwin") '' --with-gs-font-dir=${ghostscript}/share/ghostscript/fonts --with-gslib + '' + '' --with-frozenpaths ${if librsvg != null then "--with-rsvg" else ""} ''; propagatedBuildInputs = - [ bzip2 freetype ghostscript libjpeg libpng libtiff libxml2 zlib librsvg - libtool jasper libX11 ]; + [ bzip2 freetype libjpeg libpng libtiff libxml2 zlib librsvg + libtool jasper libX11 ] ++ stdenv.lib.optional (ghostscript != null && stdenv.system != "x86_64-darwin") ghostscript; buildInputs = [ tetex graphviz ];