From e379b45caaff2a70be6aff85b0e3e4e6fdbd2490 Mon Sep 17 00:00:00 2001 From: Robert Scott Date: Thu, 3 Feb 2022 21:46:28 +0000 Subject: [PATCH] graphicsmagick: add passthru regression test for issue #157920 use a pdf from the documentation of `graphviz` as it's already a dependency --- .../graphics/graphicsmagick/default.nix | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/graphics/graphicsmagick/default.nix b/pkgs/applications/graphics/graphicsmagick/default.nix index 4c83802d7ad8..f92f3686611f 100644 --- a/pkgs/applications/graphics/graphicsmagick/default.nix +++ b/pkgs/applications/graphics/graphicsmagick/default.nix @@ -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"; @@ -40,6 +43,16 @@ stdenv.mkDerivation rec { 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";