core/pkgs/by-name/gh/ghostscript/test-corpus-render.nix

38 lines
747 B
Nix
Raw Normal View History

2024-05-02 00:46:19 +00:00
{ stdenv
, fetchgit
, ghostscript
}:
stdenv.mkDerivation {
pname = "ghostscript-test-corpus-render";
version = "unstable-2023-05-19";
src = fetchgit {
url = "git://git.ghostscript.com/tests.git";
rev = "f7d5087d3d6c236707842dcd428818c6cb8fb041";
hash = "sha256-xHOEo1ZJG1GCcEKqaXLDpfRRQxpbSy0bzicKju9hG40=";
};
dontConfigure = true;
dontBuild = true;
doCheck = true;
checkPhase = ''
find . -iregex '.*\.\(ps\|eps\|pdf\)' | while read f; do
echo "Rendering $f"
${ghostscript}/bin/gs \
-dNOPAUSE \
-dBATCH \
-sDEVICE=bitcmyk \
-sOutputFile=/dev/null \
-r600 \
-dBufferSpace=100000 \
$f
done
'';
installPhase = ''
touch $out
'';
}