9 python3Packages.buildPythonApplication rec {
10 pname = "rastertosag-gdi";
13 url = "https://www.openprinting.org/download/printing/${pname}/${pname}-${version}.tar.gz";
14 sha256 = "1ldplpv497j8vhw24sksg3fiw8c5pqr0wajajh7p5xpvb6zlcmvw";
19 url = "https://sources.debian.org/data/main/r/${pname}/0.1-7/debian/patches/0001-${pname}-python3.patch";
20 sha256 = "1l3xbrs67025595k9ba5794q3s74anizpbxwsshcfhmbrzd9h8hg";
24 nativeBuildInputs = [ (lib.getBin cups) patchPpdFilesHook ];
25 # The source image also brings pre-built ppd files,
26 # but we prefer to generate from source where possible, so
27 # the following line generates ppd files from the drv file.
29 ppdc -v -d . -I "${cups}/share/cups/ppdc" rastertosag-gdi.drv
33 install -vDm 0644 -t "${placeholder "out"}/share/cups/model/rastertosag-gdi/" *.ppd
34 install -vDm 0755 -t "${placeholder "out"}/bin/" rastertosag-gdi
35 install -vd "${placeholder "out"}/lib/cups/filter/"
36 ln -vst "${placeholder "out"}/lib/cups/filter/" "${placeholder "out"}/bin/rastertosag-gdi"
39 ppdFileCommands = [ "rastertosag-gdi" ];
41 gzip -9nv "${placeholder "out"}/share/cups/model/rastertosag-gdi"/*.ppd
44 description = "CUPS driver for Ricoh Aficio SP 1000S and SP 1100S printers";
45 mainProgram = "rastertosag-gdi";
46 downloadPage = "https://www.openprinting.org/download/printing/rastertosag-gdi/";
47 homepage = "https://www.openprinting.org/driver/rastertosag-gdi/";
48 license = lib.licenses.free; # just "GPL", according to README
49 maintainers = [ lib.maintainers.yarny ];
51 This package brings CUPS raster filter
52 for Ricoh Aficio SP 1000S and SP 1100S.
53 In contrast to other Ricoh laser printers,
54 they use the proprietary SAG-GDI raster format by
55 Sagem Communication and do not understand PCL or PostScript.
56 Therefore they do not work with Ricoh's PPD files.