2014-10-30 12:34:26 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2010-04-30 11:49:33 +01:00
|
|
|
, 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-10-30 12:34:26 +00:00
|
|
|
|
2014-11-26 11:05:05 +00:00
|
|
|
version = "6.9.0-0";
|
2014-10-30 12:34:26 +00:00
|
|
|
|
|
|
|
arch =
|
|
|
|
if stdenv.system == "i686-linux" then "i686"
|
|
|
|
else if stdenv.system == "x86_64-linux" || stdenv.system == "x86_64-darwin" then "x86-64"
|
|
|
|
else throw "ImageMagick is not supported on this platform.";
|
|
|
|
|
2010-04-30 11:49:33 +01:00
|
|
|
in
|
2014-10-30 12:34:26 +00:00
|
|
|
|
2010-04-30 11:49:33 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2008-02-28 18:53:39 +00:00
|
|
|
name = "ImageMagick-${version}";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2014-11-26 20:40:43 +00:00
|
|
|
url = "mirror://imagemagick/releases/${name}.tar.xz";
|
2014-11-26 11:05:05 +00:00
|
|
|
sha256 = "1dmrl5x63msdnxsf4cmhz5v4ard2z3jrgp2zhqlb27399j81qcqj";
|
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 "";
|
|
|
|
|
2014-10-30 12:34:26 +00:00
|
|
|
configureFlags =
|
|
|
|
[ "--with-frozenpaths" ]
|
|
|
|
++ [ "--with-gcc-arch=${arch}" ]
|
|
|
|
++ lib.optional (librsvg != null) "--with-rsvg"
|
|
|
|
++ lib.optionals (stdenv.system != "x86_64-darwin")
|
|
|
|
[ "--with-gs-font-dir=${ghostscript}/share/ghostscript/fonts"
|
|
|
|
"--with-gslib"
|
|
|
|
];
|
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
|
2014-10-30 12:34:26 +00:00
|
|
|
] ++ 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
|
|
|
}
|