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