2010-04-30 10:49:33 +00:00
|
|
|
{ stdenv
|
|
|
|
, fetchurl
|
2013-11-12 20:53:37 +00:00
|
|
|
, pkgconfig
|
2010-04-30 10:49:33 +00:00
|
|
|
, bzip2
|
2013-11-12 20:53:37 +00:00
|
|
|
, fontconfig
|
2010-04-30 10:49:33 +00:00
|
|
|
, freetype
|
2013-01-11 17:32:45 +00:00
|
|
|
, ghostscript ? null
|
2010-04-30 10:49:33 +00:00
|
|
|
, libjpeg
|
|
|
|
, libpng
|
|
|
|
, libtiff
|
|
|
|
, libxml2
|
|
|
|
, zlib
|
|
|
|
, libtool
|
|
|
|
, jasper
|
|
|
|
, libX11
|
|
|
|
, tetex ? null
|
|
|
|
, librsvg ? null
|
|
|
|
}:
|
2008-05-16 11:05:37 +00:00
|
|
|
|
2010-04-30 10:49:33 +00:00
|
|
|
let
|
2013-11-12 20:53:37 +00:00
|
|
|
version = "6.8.7-5";
|
2010-04-30 10:49:33 +00:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
2008-02-28 18:53:39 +00:00
|
|
|
name = "ImageMagick-${version}";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2011-06-07 21:49:04 +00:00
|
|
|
url = "mirror://imagemagick/${name}.tar.xz";
|
2013-11-12 20:53:37 +00:00
|
|
|
sha256 = "1cn1kg7scs6r7r00qlqirhnmqjnmyczbidab3vgqarw9qszh2ri6";
|
2008-02-28 18:53:39 +00:00
|
|
|
};
|
|
|
|
|
2013-09-26 17:27:13 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2013-09-15 16:13:26 +00:00
|
|
|
preConfigure = if tetex != null then
|
|
|
|
''
|
|
|
|
export DVIDecodeDelegate=${tetex}/bin/dvips
|
|
|
|
'' else "";
|
|
|
|
|
2013-01-11 17:32:45 +00:00
|
|
|
configureFlags = "" + stdenv.lib.optionalString (ghostscript != null && stdenv.system != "x86_64-darwin") ''
|
2008-05-16 11:05:37 +00:00
|
|
|
--with-gs-font-dir=${ghostscript}/share/ghostscript/fonts
|
|
|
|
--with-gslib
|
2013-01-11 17:32:45 +00:00
|
|
|
'' + ''
|
2010-10-28 08:46:13 +00:00
|
|
|
--with-frozenpaths
|
|
|
|
${if librsvg != null then "--with-rsvg" else ""}
|
2008-05-16 11:05:37 +00:00
|
|
|
'';
|
|
|
|
|
2011-06-07 21:49:04 +00:00
|
|
|
propagatedBuildInputs =
|
2013-11-12 20:53:37 +00:00
|
|
|
[ bzip2 fontconfig freetype libjpeg libpng libtiff libxml2 zlib librsvg
|
2013-09-26 17:27:13 +00:00
|
|
|
libtool jasper libX11
|
|
|
|
] ++ stdenv.lib.optional (ghostscript != null && stdenv.system != "x86_64-darwin") ghostscript;
|
2011-06-07 21:49:04 +00:00
|
|
|
|
2013-11-12 20:53:37 +00:00
|
|
|
buildInputs = [ tetex pkgconfig ];
|
2011-06-07 21:49:04 +00:00
|
|
|
|
2013-09-15 16:13:26 +00:00
|
|
|
postInstall = ''(cd "$out/include" && ln -s ImageMagick* ImageMagick)'';
|
2008-02-28 18:53:39 +00:00
|
|
|
|
2013-11-12 20:53:37 +00:00
|
|
|
meta = with stdenv.lib; {
|
2013-01-06 21:30:23 +00:00
|
|
|
homepage = http://www.imagemagick.org/;
|
|
|
|
description = "A software suite to create, edit, compose, or convert bitmap images";
|
2013-11-14 15:42:58 +00:00
|
|
|
platforms = platforms.linux ++ [ "x86_64-darwin" ];
|
2013-11-12 20:53:37 +00:00
|
|
|
maintainers = with maintainers; [ the-kenny ];
|
2008-02-28 18:53:39 +00:00
|
|
|
};
|
2010-04-30 10:49:33 +00:00
|
|
|
}
|