From d24d65786c238762614d76b7a5b1611962a18bff Mon Sep 17 00:00:00 2001 From: Robert Scott Date: Sat, 11 Sep 2021 19:07:58 +0100 Subject: [PATCH] ghostscript: disable checkPhase, expand installCheckPhase upon closer inspection, `make check` does little except rebuild everything with some different options. ghostscript has a python-based test suite, but it looks like an unmaintained disaster zone. so the best we can probably do for now is ensure we can render all the provided examples. --- pkgs/misc/ghostscript/default.nix | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/pkgs/misc/ghostscript/default.nix b/pkgs/misc/ghostscript/default.nix index 760ec2bc0534..3a41f6f66907 100644 --- a/pkgs/misc/ghostscript/default.nix +++ b/pkgs/misc/ghostscript/default.nix @@ -85,7 +85,8 @@ stdenv.mkDerivation rec { "--with-cups-datadir=$(out)/share/cups" ]; - doCheck = true; + # make check does nothing useful + doCheck = false; # don't build/install statically linked bin/gs buildFlags = [ "so" ]; @@ -115,6 +116,19 @@ stdenv.mkDerivation rec { runHook preInstallCheck $out/bin/gs --version + pushd examples + for f in *.{ps,eps,pdf}; do + echo "Rendering $f" + $out/bin/gs \ + -dNOPAUSE \ + -dBATCH \ + -sDEVICE=bitcmyk \ + -sOutputFile=/dev/null \ + -r600 \ + -dBufferSpace=100000 \ + $f + done + popd # examples runHook postInstallCheck '';