2010-04-30 11:49:33 +01:00
|
|
|
{ stdenv
|
|
|
|
, fetchurl
|
2013-11-12 20:53:37 +00:00
|
|
|
, pkgconfig
|
2010-04-30 11:49:33 +01:00
|
|
|
, bzip2
|
2013-11-12 20:53:37 +00:00
|
|
|
, fontconfig
|
2010-04-30 11:49:33 +01:00
|
|
|
, freetype
|
2013-01-11 17:32:45 +00:00
|
|
|
, ghostscript ? null
|
2010-04-30 11:49:33 +01:00
|
|
|
, libjpeg
|
|
|
|
, libpng
|
|
|
|
, libtiff
|
|
|
|
, libxml2
|
|
|
|
, zlib
|
|
|
|
, libtool
|
|
|
|
, jasper
|
|
|
|
, libX11
|
|
|
|
, tetex ? null
|
|
|
|
, librsvg ? null
|
|
|
|
}:
|
2008-05-16 12:05:37 +01:00
|
|
|
|
2010-04-30 11:49:33 +01:00
|
|
|
let
|
2014-04-17 02:11:41 +01:00
|
|
|
version = "6.8.9-0";
|
2010-04-30 11:49:33 +01:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
2008-02-28 18:53:39 +00:00
|
|
|
name = "ImageMagick-${version}";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2011-06-07 22:49:04 +01:00
|
|
|
url = "mirror://imagemagick/${name}.tar.xz";
|
2014-04-17 02:11:41 +01:00
|
|
|
sha256 = "1lapn2798fkc2wn81slpms5p21kq4dsyg45khsk7n8p69cvrmw2b";
|
2008-02-28 18:53:39 +00:00
|
|
|
};
|
|
|
|
|
2013-09-26 18:27:13 +01:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2013-09-15 17:13:26 +01:00
|
|
|
preConfigure = if tetex != null then
|
|
|
|
''
|
|
|
|
export DVIDecodeDelegate=${tetex}/bin/dvips
|
|
|
|
'' else "";
|
|
|
|
|
2013-12-17 10:45:07 +00:00
|
|
|
configureFlags = "" + stdenv.lib.optionalString (stdenv.system != "x86_64-darwin") ''
|
2008-05-16 12:05:37 +01:00
|
|
|
--with-gs-font-dir=${ghostscript}/share/ghostscript/fonts
|
|
|
|
--with-gslib
|
2013-01-11 17:32:45 +00:00
|
|
|
'' + ''
|
2010-10-28 09:46:13 +01:00
|
|
|
--with-frozenpaths
|
|
|
|
${if librsvg != null then "--with-rsvg" else ""}
|
2008-05-16 12:05:37 +01:00
|
|
|
'';
|
|
|
|
|
2011-06-07 22:49:04 +01:00
|
|
|
propagatedBuildInputs =
|
2013-11-12 20:53:37 +00:00
|
|
|
[ bzip2 fontconfig freetype libjpeg libpng libtiff libxml2 zlib librsvg
|
2013-09-26 18:27:13 +01:00
|
|
|
libtool jasper libX11
|
2013-12-17 10:45:07 +00:00
|
|
|
] ++ stdenv.lib.optional (stdenv.system != "x86_64-darwin") ghostscript;
|
2011-06-07 22:49:04 +01:00
|
|
|
|
2013-11-12 20:53:37 +00:00
|
|
|
buildInputs = [ tetex pkgconfig ];
|
2011-06-07 22:49:04 +01:00
|
|
|
|
2013-09-15 17:13:26 +01: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 11:49:33 +01:00
|
|
|
}
|