1{
2 stdenv,
3 fetchgit,
4 ghostscript,
5}:
6
7stdenv.mkDerivation {
8 pname = "ghostscript-test-corpus-render";
9 version = "unstable-2023-05-19";
10
11 src = fetchgit {
12 url = "git://git.ghostscript.com/tests.git";
13 rev = "f7d5087d3d6c236707842dcd428818c6cb8fb041";
14 hash = "sha256-xHOEo1ZJG1GCcEKqaXLDpfRRQxpbSy0bzicKju9hG40=";
15 };
16
17 dontConfigure = true;
18 dontBuild = true;
19
20 doCheck = true;
21 checkPhase = ''
22 find . -iregex '.*\.\(ps\|eps\|pdf\)' | while read f; do
23 echo "Rendering $f"
24 ${ghostscript}/bin/gs \
25 -dNOPAUSE \
26 -dBATCH \
27 -sDEVICE=bitcmyk \
28 -sOutputFile=/dev/null \
29 -r600 \
30 -dBufferSpace=100000 \
31 $f
32 done
33 '';
34
35 installPhase = ''
36 touch $out
37 '';
38}