2021-01-15 14:21:58 +01:00
|
|
|
{ lib, stdenv, fetchurl, bzip2, freetype, graphviz, ghostscript
|
2016-10-13 23:53:43 +02:00
|
|
|
, libjpeg, libpng, libtiff, libxml2, zlib, libtool, xz, libX11
|
2021-06-02 12:51:28 +02:00
|
|
|
, libwebp, quantumdepth ? 8, fixDarwinDylibNames, nukeReferences }:
|
2010-03-04 15:44:47 +01:00
|
|
|
|
2018-04-19 00:53:42 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "graphicsmagick";
|
2021-01-20 20:47:58 +01:00
|
|
|
version = "1.3.36";
|
2010-03-04 15:44:47 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2012-02-23 22:14:19 +01:00
|
|
|
url = "mirror://sourceforge/graphicsmagick/GraphicsMagick-${version}.tar.xz";
|
2021-01-20 20:47:58 +01:00
|
|
|
sha256 = "0ilg6fkppb4avzais1dvi3qf6ln7v3mzj7gjm83w7pwwfpg3ynsx";
|
2010-03-04 15:44:47 +01:00
|
|
|
};
|
|
|
|
|
2016-10-13 23:53:43 +02:00
|
|
|
patches = [
|
|
|
|
./disable-popen.patch
|
|
|
|
];
|
2016-05-30 10:26:31 +02:00
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--enable-shared"
|
2021-02-24 21:02:35 +01:00
|
|
|
"--with-frozenpaths"
|
2016-05-30 10:26:31 +02:00
|
|
|
"--with-quantum-depth=${toString quantumdepth}"
|
|
|
|
"--with-gslib=yes"
|
|
|
|
];
|
2010-03-04 15:44:51 +01:00
|
|
|
|
2010-03-04 15:44:47 +01:00
|
|
|
buildInputs =
|
|
|
|
[ bzip2 freetype ghostscript graphviz libjpeg libpng libtiff libX11 libxml2
|
2016-05-30 10:26:31 +02:00
|
|
|
zlib libtool libwebp
|
2020-10-26 08:17:14 +01:00
|
|
|
];
|
2010-03-04 15:44:47 +01:00
|
|
|
|
2021-06-02 12:51:28 +02:00
|
|
|
nativeBuildInputs = [ xz nukeReferences ]
|
|
|
|
++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
|
|
|
|
|
|
|
|
# Remove CFLAGS from the binaries to avoid closure bloat.
|
|
|
|
# In the past we have had -dev packages in the closure of the binaries soley due to the string references.
|
|
|
|
postConfigure = ''
|
|
|
|
nuke-refs ./magick/magick_config.h
|
|
|
|
'';
|
2012-02-23 22:14:19 +01:00
|
|
|
|
2010-03-04 17:41:10 +01:00
|
|
|
postInstall = ''
|
|
|
|
sed -i 's/-ltiff.*'\'/\'/ $out/bin/*
|
|
|
|
'';
|
|
|
|
|
2010-03-04 15:44:47 +01:00
|
|
|
meta = {
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "http://www.graphicsmagick.org";
|
2010-03-04 15:44:47 +01:00
|
|
|
description = "Swiss army knife of image processing";
|
2021-01-15 14:21:58 +01:00
|
|
|
license = lib.licenses.mit;
|
|
|
|
platforms = lib.platforms.all;
|
2010-03-04 15:44:47 +01:00
|
|
|
};
|
|
|
|
}
|