Merge pull request #158050 from risicle/ris-graphicsmagick-157920-fix

graphicsmagick: fix use of delegates in conversions
This commit is contained in:
Dmitry Kalinkin 2022-02-03 20:04:38 -05:00 committed by GitHub
commit 04fc7d2352
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,6 +1,9 @@
{ lib, stdenv, fetchurl, bzip2, freetype, graphviz, ghostscript
, libjpeg, libpng, libtiff, libxml2, zlib, libtool, xz, libX11
, libwebp, quantumdepth ? 8, fixDarwinDylibNames, nukeReferences }:
, libwebp, quantumdepth ? 8, fixDarwinDylibNames, nukeReferences
, runCommand
, graphicsmagick # for passthru.tests
}:
stdenv.mkDerivation rec {
pname = "graphicsmagick";
@ -33,13 +36,23 @@ stdenv.mkDerivation rec {
# 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
nuke-refs -e $out ./magick/magick_config.h
'';
postInstall = ''
sed -i 's/-ltiff.*'\'/\'/ $out/bin/*
'';
passthru = {
tests = {
issue-157920 = runCommand "issue-157920-regression-test" {
buildInputs = [ graphicsmagick ];
} ''
gm convert ${graphviz}/share/graphviz/doc/pdf/neatoguide.pdf jpg:$out
'';
};
};
meta = {
homepage = "http://www.graphicsmagick.org";
description = "Swiss army knife of image processing";