2021-01-17 00:15:33 +00:00
|
|
|
{ lib, stdenv, fetchurl, bzip2, freetype, graphviz, ghostscript
|
2020-04-24 23:36:52 +00:00
|
|
|
, libjpeg, libpng, libtiff, libxml2, zlib, libtool, xz, libX11
|
|
|
|
, libwebp, quantumdepth ? 8, fixDarwinDylibNames }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "graphicsmagick";
|
2020-05-15 21:57:56 +00:00
|
|
|
version = "1.3.35";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://sourceforge/graphicsmagick/GraphicsMagick-${version}.tar.xz";
|
2020-05-15 21:57:56 +00:00
|
|
|
sha256 = "0l024l4hawm9s3jqrgi2j0lxgm61dqh8sgkj1017ma7y11hqv2hq";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
./disable-popen.patch
|
|
|
|
];
|
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--enable-shared"
|
|
|
|
"--with-quantum-depth=${toString quantumdepth}"
|
|
|
|
"--with-gslib=yes"
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs =
|
|
|
|
[ bzip2 freetype ghostscript graphviz libjpeg libpng libtiff libX11 libxml2
|
|
|
|
zlib libtool libwebp
|
2020-11-12 09:05:59 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-11-12 09:05:59 +00:00
|
|
|
nativeBuildInputs = [ xz ]
|
2021-01-17 00:15:33 +00:00
|
|
|
++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
sed -i 's/-ltiff.*'\'/\'/ $out/bin/*
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = "http://www.graphicsmagick.org";
|
|
|
|
description = "Swiss army knife of image processing";
|
2021-01-17 00:15:33 +00:00
|
|
|
license = lib.licenses.mit;
|
|
|
|
platforms = lib.platforms.all;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|