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

graphicsmagick: fix use of delegates in conversions

authored by Dmitry Kalinkin and committed by GitHub 04fc7d23 b964d23a

+15 -2
+15 -2
pkgs/applications/graphics/graphicsmagick/default.nix
··· 1 1 { lib, stdenv, fetchurl, bzip2, freetype, graphviz, ghostscript 2 2 , libjpeg, libpng, libtiff, libxml2, zlib, libtool, xz, libX11 3 - , libwebp, quantumdepth ? 8, fixDarwinDylibNames, nukeReferences }: 3 + , libwebp, quantumdepth ? 8, fixDarwinDylibNames, nukeReferences 4 + , runCommand 5 + , graphicsmagick # for passthru.tests 6 + }: 4 7 5 8 stdenv.mkDerivation rec { 6 9 pname = "graphicsmagick"; ··· 33 36 # Remove CFLAGS from the binaries to avoid closure bloat. 34 37 # In the past we have had -dev packages in the closure of the binaries soley due to the string references. 35 38 postConfigure = '' 36 - nuke-refs ./magick/magick_config.h 39 + nuke-refs -e $out ./magick/magick_config.h 37 40 ''; 38 41 39 42 postInstall = '' 40 43 sed -i 's/-ltiff.*'\'/\'/ $out/bin/* 41 44 ''; 45 + 46 + passthru = { 47 + tests = { 48 + issue-157920 = runCommand "issue-157920-regression-test" { 49 + buildInputs = [ graphicsmagick ]; 50 + } '' 51 + gm convert ${graphviz}/share/graphviz/doc/pdf/neatoguide.pdf jpg:$out 52 + ''; 53 + }; 54 + }; 42 55 43 56 meta = { 44 57 homepage = "http://www.graphicsmagick.org";