cups.scm 46 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2015, 2019, 2021 Ricardo Wurmus <rekado@elephly.net>
  3. ;;; Copyright © 2015, 2016, 2017, 2019, 2021 Ludovic Courtès <ludo@gnu.org>
  4. ;;; Copyright © 2015, 2016, 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
  5. ;;; Copyright © 2016 Danny Milosavljevic <dannym@scratchpost.org>
  6. ;;; Copyright © 2017 Leo Famulari <leo@famulari.name>
  7. ;;; Copyright © 2017 Mark H Weaver <mhw@netris.org>
  8. ;;; Copyright © 2017–2021 Tobias Geerinckx-Rice <me@tobias.gr>
  9. ;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
  10. ;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
  11. ;;;
  12. ;;; This file is part of GNU Guix.
  13. ;;;
  14. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  15. ;;; under the terms of the GNU General Public License as published by
  16. ;;; the Free Software Foundation; either version 3 of the License, or (at
  17. ;;; your option) any later version.
  18. ;;;
  19. ;;; GNU Guix is distributed in the hope that it will be useful, but
  20. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  21. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  22. ;;; GNU General Public License for more details.
  23. ;;;
  24. ;;; You should have received a copy of the GNU General Public License
  25. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  26. (define-module (gnu packages cups)
  27. #:use-module (gnu packages)
  28. #:use-module (gnu packages algebra)
  29. #:use-module (gnu packages autotools)
  30. #:use-module (gnu packages avahi)
  31. #:use-module (gnu packages base)
  32. #:use-module (gnu packages compression)
  33. #:use-module (gnu packages fonts) ; font-dejavu
  34. #:use-module (gnu packages fontutils)
  35. #:use-module (gnu packages ghostscript)
  36. #:use-module (gnu packages glib)
  37. #:use-module (gnu packages groff)
  38. #:use-module (gnu packages image)
  39. #:use-module (gnu packages libusb)
  40. #:use-module (gnu packages pdf)
  41. #:use-module (gnu packages perl)
  42. #:use-module (gnu packages pkg-config)
  43. #:use-module (gnu packages polkit)
  44. #:use-module (gnu packages pretty-print)
  45. #:use-module (gnu packages python)
  46. #:use-module (gnu packages python-xyz)
  47. #:use-module (gnu packages qt)
  48. #:use-module (gnu packages scanner)
  49. #:use-module (gnu packages tls)
  50. #:use-module (guix build-system cmake)
  51. #:use-module (guix build-system gnu)
  52. #:use-module (guix build-system python)
  53. #:use-module (guix download)
  54. #:use-module (guix git-download)
  55. #:use-module ((guix licenses) #:prefix license:)
  56. #:use-module (guix packages)
  57. #:use-module (guix utils)
  58. #:use-module (srfi srfi-1)
  59. #:use-module (ice-9 match))
  60. (define-public brlaser
  61. (let ((commit "9d7ddda8383bfc4d205b5e1b49de2b8bcd9137f1")
  62. (revision "1"))
  63. (package
  64. (name "brlaser")
  65. (version (git-version "6" revision commit))
  66. (source (origin
  67. (method git-fetch)
  68. (uri (git-reference
  69. (url "https://github.com/pdewacht/brlaser")
  70. (commit commit)))
  71. (file-name (git-file-name name version))
  72. (sha256
  73. (base32
  74. "1drh0nk7amn9a8wykki4l9maqa4vy7vwminypfy1712alwj31nd4"))))
  75. (build-system cmake-build-system)
  76. (arguments
  77. `(#:configure-flags
  78. (list (string-append "-DCUPS_DATA_DIR="
  79. (assoc-ref %outputs "out")
  80. "/share/cups")
  81. (string-append "-DCUPS_SERVER_BIN="
  82. (assoc-ref %outputs "out")
  83. "/lib/cups"))))
  84. (inputs
  85. `(("ghostscript" ,ghostscript)
  86. ("cups" ,cups)
  87. ("zlib" ,zlib)))
  88. (home-page "https://github.com/pdewacht/brlaser")
  89. (synopsis "Brother laser printer driver")
  90. (description "Brlaser is a CUPS driver for Brother laser printers. This
  91. driver is known to work with these printers:
  92. @enumerate
  93. @item Brother DCP-1510 series
  94. @item Brother DCP-1600 series
  95. @item Brother DCP-7030
  96. @item Brother DCP-7040
  97. @item Brother DCP-7055
  98. @item Brother DCP-7055W
  99. @item Brother DCP-7060D
  100. @item Brother DCP-7065DN
  101. @item Brother DCP-7080
  102. @item Brother DCP-L2500D series
  103. @item Brother DCP-L2520D series
  104. @item Brother DCP-L2540DW series
  105. @item Brother HL-1110 series
  106. @item Brother HL-1200 series
  107. @item Brother HL-2030 series
  108. @item Brother HL-2140 series
  109. @item Brother HL-2220 series
  110. @item Brother HL-2270DW series
  111. @item Brother HL-5030 series
  112. @item Brother HL-L2300D series
  113. @item Brother HL-L2320D series
  114. @item Brother HL-L2340D series
  115. @item Brother HL-L2360D series
  116. @item Brother MFC-1910W
  117. @item Brother MFC-7240
  118. @item Brother MFC-7360N
  119. @item Brother MFC-7365DN
  120. @item Brother MFC-7840W
  121. @item Brother MFC-L2710DW series
  122. @item Lenovo M7605D
  123. @end enumerate")
  124. (license license:gpl2+))))
  125. (define-public cups-filters
  126. (package
  127. (name "cups-filters")
  128. (version "1.28.9")
  129. (source(origin
  130. (method url-fetch)
  131. (uri
  132. (string-append "https://openprinting.org/download/cups-filters/"
  133. "cups-filters-" version ".tar.xz"))
  134. (sha256
  135. (base32
  136. "1bk0x1rrb8wqbhh5c979ppgy6s2kqss8mjdlahgcjvd79wm3fs9g"))
  137. (modules '((guix build utils)))
  138. (snippet
  139. ;; install backends, banners and filters to cups-filters output
  140. ;; directory, not the cups server directory
  141. '(begin
  142. (substitute* "Makefile.in"
  143. (("CUPS_DATADIR = @CUPS_DATADIR@")
  144. "CUPS_DATADIR = $(PREFIX)/share/cups")
  145. (("pkgcupsserverrootdir = \\$\\(CUPS_SERVERROOT\\)")
  146. "pkgcupsserverrootdir = $(PREFIX)")
  147. ;; Choose standard directories notably so that binaries are
  148. ;; stripped.
  149. (("pkgbackenddir = \\$\\(CUPS_SERVERBIN\\)/backend")
  150. "pkgbackenddir = $(PREFIX)/lib/cups/backend")
  151. (("pkgfilterdir = \\$\\(CUPS_SERVERBIN\\)/filter")
  152. "pkgfilterdir = $(PREFIX)/lib/cups/filter"))
  153. ;; Find bannertopdf data such as the print test page in our
  154. ;; output directory, not CUPS's prefix.
  155. (substitute* "configure"
  156. (("\\{CUPS_DATADIR\\}/data")
  157. "{prefix}/share/cups/data"))
  158. #t))))
  159. (build-system gnu-build-system)
  160. (arguments
  161. `(#:make-flags (list (string-append "PREFIX=" %output))
  162. #:configure-flags
  163. `("--disable-driverless" ; TODO: enable this
  164. "--disable-mutool" ; depends on yet another PDF library (mupdf)
  165. ;; Look for the "domain socket of CUPS" in /var/run/cups.
  166. "--localstatedir=/var"
  167. ;; Free software for the win.
  168. "--with-acroread-path=evince"
  169. ,(string-append "--with-test-font-path="
  170. (assoc-ref %build-inputs "font-dejavu")
  171. "/share/fonts/truetype/DejaVuSans.ttf")
  172. ,(string-append "--with-gs-path="
  173. (assoc-ref %build-inputs "ghostscript")
  174. "/bin/gsc")
  175. ,(string-append "--with-shell="
  176. (assoc-ref %build-inputs "bash")
  177. "/bin/bash")
  178. ,(string-append "--with-rcdir="
  179. (assoc-ref %outputs "out") "/etc/rc.d"))
  180. #:phases (modify-phases %standard-phases
  181. (add-after 'unpack 'patch-foomatic-hardcoded-file-names
  182. (lambda* (#:key inputs outputs #:allow-other-keys)
  183. ;; Foomatic has hardcoded file names we need to fix.
  184. (let ((out (assoc-ref outputs "out"))
  185. (gs (assoc-ref inputs "ghostscript")))
  186. (substitute* "filter/foomatic-rip/foomaticrip.c"
  187. (("/usr/local/lib/cups/filter")
  188. (string-append out "/lib/cups/filter")))
  189. #t)))
  190. (add-after 'install 'wrap-filters
  191. (lambda* (#:key inputs outputs #:allow-other-keys)
  192. ;; Some filters expect to find things in $PATH. We cannot
  193. ;; just hard-code all absolute file names in the source
  194. ;; because foomatic-rip, for example, has tests like
  195. ;; 'startswith(cmd, "gs")'.
  196. (let ((out (assoc-ref outputs "out"))
  197. (ghostscript (assoc-ref inputs "ghostscript"))
  198. (grep (assoc-ref inputs "grep")))
  199. (for-each (lambda (file)
  200. (wrap-program file
  201. `("PATH" ":" prefix
  202. (,(string-append ghostscript "/bin:"
  203. grep "/bin")))))
  204. (find-files (string-append
  205. out "/lib/cups/filter")))
  206. #t))))))
  207. (native-inputs
  208. `(("glib" ,glib "bin") ; for gdbus-codegen
  209. ("pkg-config" ,pkg-config)))
  210. (inputs
  211. `(("avahi" ,avahi)
  212. ("fontconfig" ,fontconfig)
  213. ("freetype" ,freetype)
  214. ("font-dejavu" ,font-dejavu) ; also needed by test suite
  215. ("ghostscript" ,ghostscript/cups)
  216. ("grep" ,grep)
  217. ("ijs" ,ijs)
  218. ("dbus" ,dbus)
  219. ("lcms" ,lcms)
  220. ("libjpeg" ,libjpeg-turbo)
  221. ("libpng" ,libpng)
  222. ("libtiff" ,libtiff)
  223. ("glib" ,glib)
  224. ("qpdf" ,qpdf)
  225. ("poppler" ,poppler)
  226. ("cups-minimal" ,cups-minimal)))
  227. (home-page "https://wiki.linuxfoundation.org/openprinting/cups-filters")
  228. (synopsis "OpenPrinting CUPS filters and backends")
  229. (description
  230. "Contains backends, filters, and other software that was once part of the
  231. core CUPS distribution but is no longer maintained by Apple Inc. In addition
  232. it contains additional filters developed independently of Apple, especially
  233. filters for the PDF-centric printing workflow introduced by OpenPrinting.")
  234. ;; Different filters and backends have different licenses; see COPYING for
  235. ;; details
  236. (license (list license:gpl2
  237. license:gpl2+
  238. license:gpl3
  239. license:gpl3+
  240. license:lgpl2.0+
  241. license:expat))))
  242. ;; CUPS on non-MacOS systems requires cups-filters. Since cups-filters also
  243. ;; depends on CUPS libraries and binaries, cups-minimal has been added to
  244. ;; satisfy this dependency.
  245. (define-public cups-minimal
  246. (package
  247. (name "cups-minimal")
  248. (version "2.3.3op2")
  249. (source
  250. (origin
  251. (method git-fetch)
  252. ;; Version maintained by the OpenPrinting organization, NOT a fork. The
  253. ;; CUPS author tracks the current Apple CUPS sources and includes common
  254. ;; changes and bug fixes for GNU/Linux. See its README and for example
  255. ;; <https://github.com/apple/cups/issues/5917#issuecomment-819465891>.
  256. (uri (git-reference
  257. (url "https://github.com/OpenPrinting/cups")
  258. (commit (string-append "v" version))))
  259. (file-name (git-file-name name version))
  260. (sha256
  261. (base32 "126d6kd3pkhmsvbcflkcpk3y30iqlkdqyvrk9aqq88vbxzjd5ia6"))))
  262. (build-system gnu-build-system)
  263. (arguments
  264. `(#:configure-flags
  265. '("--disable-launchd"
  266. "--disable-systemd"
  267. "--disable-avahi"
  268. "--disable-dnssd")
  269. ;; Seven tests fail, mostly because of files that are provided by the
  270. ;; cups-filters package.
  271. #:tests? #f
  272. #:phases
  273. (modify-phases %standard-phases
  274. (add-after 'unpack 'never-cupsAdminGetServerSettings
  275. ;; Instead of querying the daemon directly, this part of CUPS assumes
  276. ;; that (1) it has access to a cupsd.conf under CUPS_SERVERROOT, and
  277. ;; (2) the file's contents apply to the running daemon. (1) is false
  278. ;; at least on Guix Systems resulting in extremely long delays when
  279. ;; loading the Web interface's /admin page. (2) isn't valid anywhere
  280. ;; because it ignores, e.g., -c FILE.
  281. ;; Upstream considers this code on ‘life support’ so just neuter it.
  282. (lambda _
  283. (substitute* "cgi-bin/admin.c"
  284. (("!cupsAdminGetServerSettings" match)
  285. (string-append "0 && " match)))))
  286. (add-after 'unpack 'remove-Web-UI-server-settings
  287. ;; The /admin page's server configuration form is questionable for
  288. ;; the same reason as cupsAdminGetServerSettings, and won't work at
  289. ;; all on Guix Systems. Remove it entirely.
  290. (lambda _
  291. ;; SUBSTITUTE* and a patch both have (dis)advantages. This is
  292. ;; shorter & should ensure that no translation is forgotten.
  293. (substitute* (find-files "templates" "^admin\\.tmpl$")
  294. ((" class=\"halves\"") "")
  295. (("<FORM.* ACTION=\"/jobs.*</FORM>" match)
  296. (string-append match "</P>{BROKEN? "))
  297. (("</FORM>}" match)
  298. (string-append match "}")))))
  299. (add-before 'configure 'patch-makedefs
  300. (lambda _
  301. (substitute* "Makedefs.in"
  302. (("INITDIR.*=.*@INITDIR@") "INITDIR = @prefix@/@INITDIR@")
  303. (("/bin/sh") (which "sh")))
  304. #t))
  305. ;; Make the compressed manpages writable so that the
  306. ;; reset-gzip-timestamps phase does not error out.
  307. (add-before 'reset-gzip-timestamps 'make-manpages-writable
  308. (lambda* (#:key outputs #:allow-other-keys)
  309. (let* ((out (assoc-ref outputs "out"))
  310. (man (string-append out "/share/man")))
  311. (for-each (lambda (file) (chmod file #o644))
  312. (find-files man "\\.gz"))
  313. #t)))
  314. (add-before 'build 'patch-tests
  315. (lambda _
  316. (substitute* "tools/ippeveprinter.c"
  317. (("# else /\\* HAVE_AVAHI \\*/")
  318. "#elif defined(HAVE_AVAHI)"))
  319. #t)))))
  320. (native-inputs
  321. `(("pkg-config" ,pkg-config)))
  322. (inputs
  323. `(("zlib" ,zlib)
  324. ("gnutls" ,gnutls)))
  325. (home-page "https://openprinting.github.io/")
  326. (synopsis "The Common Unix Printing System")
  327. (description
  328. "CUPS is a printing system that uses the Internet Printing Protocol
  329. (@dfn{IPP}). It provides System V and BSD command-line interfaces, as well
  330. as a Web interface and a C programming interface to manage printers and print
  331. jobs. It supports printing to both local (parallel, serial, USB) and
  332. networked printers, and printers can be shared from one computer to another.
  333. Internally, CUPS uses PostScript Printer Description (@dfn{PPD}) files to
  334. describe printer capabilities and features, and a wide variety of generic and
  335. device-specific programs to convert and print many types of files.")
  336. ;; CUPS is Apache 2.0 with exceptions, see the NOTICE file.
  337. (license license:asl2.0)))
  338. (define-public cups
  339. (package/inherit cups-minimal
  340. (name "cups")
  341. (arguments
  342. (substitute-keyword-arguments (package-arguments cups-minimal)
  343. ((#:tests? _ #t)
  344. ;; Three tests fail:
  345. ;; * two tests in ipp-1.1.test related to "RFC 2911 section 3.2.6:
  346. ;; Get-Jobs Operation"
  347. ;; * test of number of error/warning messages, probably related to a
  348. ;; missing font.
  349. #f)
  350. ((#:configure-flags _ '())
  351. `(list "--disable-launchd"
  352. "--disable-systemd"))
  353. ((#:phases phases '%standard-phases)
  354. `(modify-phases ,phases
  355. (add-before 'check 'patch-tests
  356. (lambda _
  357. (let ((filters (assoc-ref %build-inputs "cups-filters"))
  358. (catpath (string-append
  359. (assoc-ref %build-inputs "coreutils") "/bin/"))
  360. (testdir (string-append (getcwd) "/tmp/")))
  361. (mkdir testdir)
  362. (substitute* "test/run-stp-tests.sh"
  363. ((" *BASE=/tmp/") (string-append "BASE=" testdir))
  364. ;; Allow installation of filters from the output directory
  365. ;; and from cups-filters.
  366. (("for dir in /usr/libexec/cups/filter /usr/lib/cups/filter")
  367. (string-append
  368. "for dir in "
  369. (assoc-ref %outputs "out") "/lib/cups/filter "
  370. filters "/lib/cups/filter"))
  371. ;; Check for charsets in the default cups-filters output.
  372. (("/usr/share/cups/charsets")
  373. (string-append filters "/share/cups/charsets"))
  374. ;; Install additional required filters.
  375. (("instfilter texttopdf texttopdf pdf")
  376. (string-append
  377. "instfilter texttopdf texttopdf pdf;"
  378. "instfilter imagetoraster imagetoraster raster;"
  379. "instfilter gstoraster gstoraster raster;"
  380. "instfilter urftopdf urftopdf pdf;"
  381. "instfilter rastertopdf rastertopdf pdf;"
  382. "instfilter pstopdf pstopdf pdf"))
  383. ;; Specify the location of the lpstat binary.
  384. (("description=\"`lpstat -l")
  385. "description=\"`../systemv/lpstat -l")
  386. ;; Patch the shebangs of embedded scripts.
  387. (("#!/bin/sh") (string-append "#!" (which "sh")))
  388. ;; Also link MIME definitions from cups-filters
  389. ;; to enable the additional filters for the test suite.
  390. (("ln -s \\$root/conf/mime\\.types")
  391. (string-append
  392. "ln -s " filters
  393. "/share/cups/mime/cupsfilters.types $BASE/share/mime; "
  394. "ln -s $root/conf/mime.types"))
  395. (("ln -s \\$root/conf/mime\\.convs")
  396. (string-append
  397. "ln -s " filters
  398. "/share/cups/mime/cupsfilters.convs $BASE/share/mime; "
  399. "ln -s $root/conf/mime.convs")))
  400. ;; Fix the search path for the "cat" command.
  401. (substitute* "cups/testfile.c"
  402. (("cupsFileFind\\(\"cat\", \"/bin\"")
  403. (string-append "cupsFileFind(\"cat\", \"" catpath "\""))
  404. (("cupsFileFind\\(\"cat\", \"/bin:/usr/bin\"")
  405. (string-append "cupsFileFind(\"cat\", \"" catpath "\""))))))
  406. (add-after 'install 'install-cups-filters-symlinks
  407. (lambda* (#:key inputs outputs #:allow-other-keys)
  408. (let ((out (assoc-ref outputs "out"))
  409. (cups-filters (assoc-ref inputs "cups-filters")))
  410. ;; Charsets.
  411. (symlink
  412. (string-append cups-filters "/share/cups/charsets")
  413. (string-append out "/share/charsets"))
  414. ;; MIME types, driver files, and PPDs.
  415. (for-each
  416. (lambda (f)
  417. (symlink (string-append cups-filters f)
  418. (string-append out f)))
  419. '("/share/cups/mime/cupsfilters.types"
  420. "/share/cups/mime/cupsfilters.convs"
  421. "/share/cups/drv/cupsfilters.drv"
  422. "/share/ppd"))
  423. ;; Filters.
  424. (for-each
  425. (lambda (f)
  426. (symlink f
  427. (string-append out "/lib/cups/filter"
  428. (basename f))))
  429. (find-files (string-append cups-filters "/lib/cups/filter")))
  430. ;; Backends.
  431. (for-each
  432. (lambda (f)
  433. (symlink (string-append cups-filters f)
  434. (string-append out "/lib/cups/backend/"
  435. (basename f))))
  436. '("/lib/cups/backend/parallel"
  437. "/lib/cups/backend/serial"))
  438. ;; Banners.
  439. (let ((banners "/share/cups/banners"))
  440. (delete-file-recursively (string-append out banners))
  441. (symlink (string-append cups-filters banners)
  442. (string-append out banners)))
  443. ;; Assorted data.
  444. (let ((data "/share/cups/data"))
  445. (delete-file-recursively (string-append out data))
  446. (symlink (string-append cups-filters data)
  447. (string-append out data))))))))))
  448. (inputs
  449. `(("avahi" ,avahi)
  450. ("gnutls" ,gnutls)
  451. ("cups-filters" ,cups-filters)
  452. ("zlib" ,zlib)))))
  453. (define-public cups-pk-helper
  454. (package
  455. (name "cups-pk-helper")
  456. (version "0.2.6")
  457. (source (origin
  458. (method url-fetch)
  459. (uri (string-append "https://freedesktop.org/software/"
  460. name "/releases/" name "-" version ".tar.xz"))
  461. (sha256
  462. (base32
  463. "0a52jw6rm7lr5nbyksiia0rn7sasyb5cjqcb95z1wxm2yprgi6lm"))))
  464. (build-system gnu-build-system)
  465. (native-inputs
  466. `(("intltool" ,intltool)
  467. ("pkg-config" ,pkg-config)
  468. ("glib" ,glib)
  469. ("polkit" ,polkit)
  470. ("cups" ,cups)))
  471. (home-page "https://www.freedesktop.org/wiki/Software/cups-pk-helper/")
  472. (synopsis "PolicyKit helper to configure CUPS with fine-grained privileges")
  473. (description
  474. "This package provides the org.opensuse.CupsPkHelper.Mechanism DBus
  475. system service which uses @file{cups-pk-helper-mechanism}. This package
  476. should only be used as part of the Guix cups-pk-helper service.")
  477. (license license:gpl2+)))
  478. (define-public hplip
  479. (package
  480. (name "hplip")
  481. (version "3.21.6")
  482. (source (origin
  483. (method url-fetch)
  484. (uri (string-append "mirror://sourceforge/hplip/hplip/" version
  485. "/hplip-" version ".tar.gz"))
  486. (sha256
  487. (base32
  488. "1jkvbq64pxn5rg25pk13xwn5xr2bn0sa95yvh2q4ys0kv79n0cyc"))
  489. (modules '((guix build utils)))
  490. (snippet
  491. '(begin
  492. ;; Delete non-free blobs: .so files, pre-compiled
  493. ;; 'locatedriver' executable, etc.
  494. (for-each delete-file
  495. (find-files "."
  496. (lambda (file stat)
  497. (elf-file? file))))
  498. ;; Now remove some broken references to them.
  499. (delete-file "prnt/hpcups/ImageProcessor.h")
  500. (substitute* "Makefile.in"
  501. ((" -lImageProcessor ") " ")
  502. (("(\\@HPLIP_BUILD_TRUE\\@[[:blank:]]*).*libImageProcessor.*"
  503. _ prefix)
  504. (string-append prefix ":; \\\n")))
  505. ;; Install binaries under libexec/hplip instead of
  506. ;; share/hplip; that'll at least ensure they get stripped.
  507. ;; It's not even clear that they're of any use though...
  508. (substitute* "Makefile.in"
  509. (("^dat2drvdir =.*")
  510. "dat2drvdir = $(pkglibexecdir)\n")
  511. (("^locatedriverdir =.*")
  512. "locatedriverdir = $(pkglibexecdir)\n"))))))
  513. (build-system gnu-build-system)
  514. (outputs (list "out" "ppd"))
  515. (home-page "https://developers.hp.com/hp-linux-imaging-and-printing")
  516. (synopsis "HP printer drivers")
  517. (description
  518. "Hewlett-Packard printer drivers and PostScript Printer Descriptions
  519. (@dfn{PPD}s).")
  520. ;; The 'COPYING' file lists directories where each of these 3 licenses
  521. ;; applies.
  522. (license (list license:gpl2+ license:bsd-3 license:expat))
  523. ;; TODO install apparmor profile files eventually.
  524. (arguments
  525. `(#:configure-flags
  526. `("--disable-imageProcessor-build"
  527. "--disable-network-build"
  528. ,(string-append "--prefix=" (assoc-ref %outputs "out"))
  529. ,(string-append "--sysconfdir=" (assoc-ref %outputs "out") "/etc")
  530. ,(string-append "LDFLAGS=-Wl,-rpath="
  531. (assoc-ref %outputs "out") "/lib")
  532. ;; Disable until mime.types merging works (FIXME).
  533. "--disable-fax-build"
  534. "--enable-new-hpcups"
  535. ;; TODO add foomatic drv install eventually.
  536. ;; TODO --enable-policykit eventually.
  537. ,(string-append "--with-cupsfilterdir="
  538. (assoc-ref %outputs "out") "/lib/cups/filter")
  539. ,(string-append "--with-cupsbackenddir="
  540. (assoc-ref %outputs "out") "/lib/cups/backend")
  541. ,(string-append "--with-hpppddir="
  542. (assoc-ref %outputs "ppd") "/share/ppd/HP")
  543. ,(string-append "--with-icondir="
  544. (assoc-ref %outputs "out") "/share/applications")
  545. ,(string-append "--with-systraydir="
  546. (assoc-ref %outputs "out") "/etc/xdg")
  547. "--enable-qt5" "--disable-qt4")
  548. #:imported-modules ((guix build python-build-system)
  549. ,@%gnu-build-system-modules)
  550. #:modules ((guix build gnu-build-system)
  551. (guix build utils)
  552. ((guix build python-build-system) #:prefix python:))
  553. #:phases
  554. (modify-phases %standard-phases
  555. (add-after 'unpack 'fix-hard-coded-file-names
  556. (lambda* (#:key inputs outputs #:allow-other-keys)
  557. (let ((out (assoc-ref outputs "out"))
  558. ;; FIXME: use merged ppds (I think actually only
  559. ;; drvs need to be merged).
  560. (cupsdir (assoc-ref inputs "cups-minimal")))
  561. (substitute* "base/g.py"
  562. (("'/usr/share;[^']*'")
  563. (string-append "'" cupsdir "/share'"))
  564. (("'/etc/hp/hplip.conf'")
  565. (string-append "'" out
  566. "/etc/hp/hplip.conf" "'")))
  567. (substitute* "Makefile.in"
  568. (("[[:blank:]]check-plugin\\.py[[:blank:]]") " ")
  569. ;; FIXME Use beginning-of-word in regexp.
  570. (("[[:blank:]]plugin\\.py[[:blank:]]") " ")
  571. (("/usr/include/libusb-1.0")
  572. (search-input-directory inputs "/include/libusb-1.0"))
  573. (("hplip_statedir =.*$")
  574. ;; Don't bail out while trying to create
  575. ;; /var/lib/hplip. We can safely change its value
  576. ;; here because it's hard-coded in the code anyway.
  577. "hplip_statedir = $(prefix)\n")
  578. (("hplip_confdir = /etc/hp")
  579. ;; This is only used for installing the default config.
  580. (string-append "hplip_confdir = " out
  581. "/etc/hp"))
  582. (("halpredir = /usr/share/hal/fdi/preprobe/10osvendor")
  583. ;; We don't use hal.
  584. (string-append "halpredir = " out
  585. "/share/hal/fdi/preprobe/10osvendor"))
  586. (("rulesdir = /etc/udev/rules.d")
  587. ;; udev rules will be merged by base service.
  588. (string-append "rulesdir = " out
  589. "/lib/udev/rules.d"))
  590. (("rulessystemdir = /usr/lib/systemd/system")
  591. ;; We don't use systemd.
  592. (string-append "rulessystemdir = " out
  593. "/lib/systemd/system"))
  594. (("/etc/sane.d")
  595. (string-append out "/etc/sane.d"))))))
  596. (add-before 'configure 'fix-build-with-python-3.8
  597. (lambda* (#:key inputs #:allow-other-keys)
  598. (let ((python (assoc-ref inputs "python")))
  599. ;; XXX: The configure script looks for Python headers in the
  600. ;; wrong places as of version 3.20.3. Help it by adding the
  601. ;; include directory on C_INCLUDE_PATH.
  602. (when python
  603. (setenv "C_INCLUDE_PATH"
  604. (string-append python "/include/python"
  605. (python:python-version python)
  606. ":" (getenv "C_INCLUDE_PATH")))))))
  607. (add-after 'install 'install-models-dat
  608. (lambda* (#:key outputs #:allow-other-keys)
  609. (let* ((out (assoc-ref outputs "out"))
  610. (models-dir (string-append out
  611. "/share/hplip/data/models")))
  612. (install-file "data/models/models.dat" models-dir))))
  613. (add-after 'install 'wrap-binaries
  614. ;; Scripts in /bin are all symlinks to .py files in /share/hplip.
  615. ;; Symlinks are immune to the Python build system's 'WRAP phase,
  616. ;; and the .py files can't be wrapped because they are reused as
  617. ;; modules. Replacing the symlinks in /bin with copies and
  618. ;; wrapping them also doesn't work (“ModuleNotFoundError:
  619. ;; No module named 'base'”). Behold: a custom WRAP-PROGRAM.
  620. (lambda* (#:key inputs outputs #:allow-other-keys)
  621. (let* ((out (assoc-ref outputs "out"))
  622. (bin (string-append out "/bin"))
  623. (site (python:site-packages inputs outputs)))
  624. (with-directory-excursion bin
  625. (for-each (lambda (file)
  626. (let ((target (readlink file)))
  627. (delete-file file)
  628. (with-output-to-file file
  629. (lambda _
  630. (format #t
  631. "#!~a~@
  632. export GUIX_PYTHONPATH=\"~a:~a\"~@
  633. exec -a \"$0\" \"~a/~a\" \"$@\"~%"
  634. (which "bash")
  635. site
  636. (getenv "GUIX_PYTHONPATH")
  637. bin target)))
  638. (chmod file #o755)))
  639. (find-files "." (lambda (file stat)
  640. (eq? 'symlink (stat:type stat))))))))))))
  641. ;; Note that the error messages printed by the tools in the case of
  642. ;; missing dependencies are often downright misleading.
  643. ;; TODO: hp-toolbox still fails to start with:
  644. ;; from dbus.mainloop.pyqt5 import DBusQtMainLoop
  645. ;; ModuleNotFoundError: No module named 'dbus.mainloop.pyqt5'
  646. (inputs
  647. `(("cups-minimal" ,cups-minimal)
  648. ("dbus" ,dbus)
  649. ("libjpeg" ,libjpeg-turbo)
  650. ("libusb" ,libusb)
  651. ("python" ,python)
  652. ("python-dbus" ,python-dbus)
  653. ("python-pygobject" ,python-pygobject)
  654. ("python-pyqt" ,python-pyqt)
  655. ("python-wrapper" ,python-wrapper)
  656. ("sane-backends" ,sane-backends-minimal)
  657. ("zlib" ,zlib)))
  658. (native-inputs
  659. `(("perl" ,perl)
  660. ("pkg-config" ,pkg-config)))))
  661. (define-public hplip-minimal
  662. (package/inherit hplip
  663. (name "hplip-minimal")
  664. (arguments
  665. (substitute-keyword-arguments (package-arguments hplip)
  666. ((#:configure-flags cf)
  667. ;; Produce a "light build", meaning that only the printer (CUPS) and
  668. ;; scanner (SANE) support gets built, without all the 'hp-*'
  669. ;; command-line tools.
  670. `(cons "--enable-lite-build"
  671. (delete "--enable-qt5" ,cf)))
  672. ((#:phases phases)
  673. ;; The 'wrap-binaries' is not needed here since the 'hp-*' programs
  674. ;; are not installed.
  675. `(alist-delete 'wrap-binaries ,phases))))
  676. (inputs (remove (match-lambda
  677. ((label . _)
  678. (string-prefix? "python" label)))
  679. (package-inputs hplip)))
  680. (synopsis "GUI-less version of hplip")))
  681. (define-public foomatic-filters
  682. (package
  683. (name "foomatic-filters")
  684. (version "4.0.17")
  685. (source (origin
  686. (method url-fetch)
  687. (uri (string-append
  688. "http://www.openprinting.org/download/foomatic/"
  689. "foomatic-filters-" version ".tar.gz"))
  690. (sha256
  691. (base32
  692. "1qrkgbm5jay2r7sh9qbyf0aiyrsl1mdc844hxf7fhw95a0zfbqm2"))
  693. (patches
  694. (search-patches "foomatic-filters-CVE-2015-8327.patch"
  695. "foomatic-filters-CVE-2015-8560.patch"))))
  696. (build-system gnu-build-system)
  697. (home-page
  698. "https://wiki.linuxfoundation.org/openprinting/database/foomatic")
  699. (native-inputs
  700. `(("perl" ,perl)
  701. ("pkg-config" ,pkg-config)))
  702. (inputs
  703. `(("dbus" ,dbus)
  704. ("a2ps" ,a2ps)))
  705. (arguments
  706. '( ;; Specify the installation directories.
  707. #:configure-flags (list (string-append "ac_cv_path_CUPS_BACKENDS="
  708. (assoc-ref %outputs "out")
  709. "/lib/cups/backend")
  710. (string-append "ac_cv_path_CUPS_FILTERS="
  711. (assoc-ref %outputs "out")
  712. "/lib/cups/filter")
  713. (string-append "ac_cv_path_PPR_INTERFACES="
  714. (assoc-ref %outputs "out")
  715. "/lib/ppr/interfaces")
  716. (string-append "ac_cv_path_PPR_LIB="
  717. (assoc-ref %outputs "out")
  718. "/lib/ppr/lib")
  719. "CFLAGS=-fcommon"
  720. ;; For some reason these are misdiagnosed.
  721. "ac_cv_func_malloc_0_nonnull=yes"
  722. "ac_cv_func_realloc_0_nonnull=yes")
  723. #:test-target "tests"))
  724. (synopsis "Convert PostScript to the printer's native format")
  725. (description
  726. "This package contains filter scripts used by the printer spoolers to
  727. convert the incoming PostScript data into the printer's native format using a
  728. printer/driver specific, but spooler-independent PPD file.")
  729. (license license:gpl2+)))
  730. (define-public foo2zjs
  731. (package
  732. (name "foo2zjs")
  733. (version "20200610.1")
  734. (source
  735. (origin
  736. (method url-fetch)
  737. ;; The upstream tarball is unversioned: use a stable snapshot.
  738. (uri (string-append "https://web.archive.org/web/20210224094943if_/"
  739. "http://foo2zjs.rkkda.com/foo2zjs.tar.gz"))
  740. (sha256
  741. (base32 "03ncif50n7ck7drggqxbc7w0kgzdb90ha0dbvqk98ky8lw3k76xd"))))
  742. (build-system gnu-build-system)
  743. (arguments
  744. '(#:phases (modify-phases %standard-phases
  745. (replace 'configure
  746. (lambda* (#:key outputs #:allow-other-keys)
  747. (substitute* (find-files "." "^Makefile$")
  748. ;; Set the installation directory.
  749. (("^PREFIX[[:blank:]]*=.*$")
  750. (string-append "PREFIX = "
  751. (assoc-ref outputs "out")
  752. "\n"))
  753. (("^UDEVBIN[[:blank:]]*=.*$")
  754. "UDEVBIN = $(PREFIX)/bin\n")
  755. ;; Don't try to chown/chgrp the installed files.
  756. (("-oroot")
  757. "")
  758. (("-glp")
  759. "")
  760. ;; Placate the dependency checks.
  761. (("/usr/include/stdio.h")
  762. "/etc/passwd")
  763. (("/usr/")
  764. "$(PREFIX)/")
  765. ;; Ensure fixed timestamps in man pages.
  766. (("^MODTIME[[:blank:]]*=.*$")
  767. "MODTIME = echo Thu Jan 01 01:00:00 1970\n"))
  768. #t))
  769. (add-before 'install 'make-install-dirs
  770. (lambda* (#:key outputs #:allow-other-keys)
  771. ;; Make missing install dirs
  772. (let ((out (assoc-ref outputs "out"))
  773. (dirs '("/share/cups/model"
  774. "/share/foomatic/db/source/opt"
  775. "/share/foomatic/db/source/printer"
  776. "/share/foomatic/db/source/driver"
  777. "/lib/cups/filter")))
  778. (for-each (lambda (dir)
  779. (mkdir-p (string-append out dir)))
  780. dirs))))
  781. (add-after 'install 'wrap-wrappers
  782. (lambda* (#:key inputs outputs #:allow-other-keys)
  783. (let ((out (assoc-ref outputs "out"))
  784. (ghostscript (assoc-ref inputs "ghostscript"))
  785. (coreutils (assoc-ref inputs "coreutils"))
  786. (sed (assoc-ref inputs "sed")))
  787. (for-each (lambda (file)
  788. (wrap-program file
  789. `("PATH" ":" prefix
  790. (,(string-append ghostscript "/bin:"
  791. coreutils "/bin:"
  792. sed "/bin")))))
  793. (find-files (string-append
  794. out "/bin") "wrapper$")))))
  795. (add-after 'install 'install-cups-filters-symlinks
  796. (lambda* (#:key inputs outputs #:allow-other-keys)
  797. (let ((out (assoc-ref outputs "out")))
  798. (for-each
  799. (lambda (file)
  800. (symlink file
  801. (string-append out "/lib/cups/filter/"
  802. (basename file))))
  803. (find-files (string-append out "/bin"))))))
  804. (add-after 'install 'remove-pdf
  805. (lambda* (#:key outputs #:allow-other-keys)
  806. ;; Remove 'manual.pdf' which is (1) useless (it's a
  807. ;; concatenation of man pages), and (2) not
  808. ;; bit-reproducible due to <https://bugs.gnu.org/27593>.
  809. (let ((out (assoc-ref outputs "out")))
  810. (for-each delete-file
  811. (find-files out "^manual\\.pdf$"))
  812. #t))))
  813. #:parallel-build? #f ;broken makefile
  814. #:tests? #f ;no tests
  815. #:make-flags '("CC=gcc")))
  816. (inputs
  817. `(("coreutils" ,coreutils)
  818. ("sed" ,sed)
  819. ("ghostscript" ,ghostscript)
  820. ("foomatic-filters" ,foomatic-filters))) ;for 'foomatic-rip'
  821. (native-inputs
  822. `(("bc" ,bc)
  823. ("groff" ,groff)))
  824. (home-page "http://foo2zjs.rkkda.com/")
  825. (synopsis "Printer driver for ZjStream-based printers")
  826. (description
  827. "foo2zjs is a printer driver for printers that use the Zenographics
  828. ZjStream wire protocol for their print data, often erroneously referred to as
  829. winprinters or GDI printers.
  830. It supports Minolta/QMS@tie{}Magicolor, Minolta@tie{}Color@tie{}PageWorks/Pro,
  831. HP@tie{}LaserJet, and possibly other printers. See @file{README} for details.")
  832. (license (list license:expat ; icc2ps/*.[ch]
  833. license:gpl2+)))) ; everything else
  834. (define-public epson-inkjet-printer-escpr
  835. (package
  836. (name "epson-inkjet-printer-escpr")
  837. (version "1.7.17")
  838. ;; XXX: This currently works. But it will break as soon as a newer
  839. ;; version is available since the URLs for older versions are not
  840. ;; preserved. An alternative source will be added as soon as
  841. ;; available.
  842. (source
  843. (origin
  844. (method url-fetch)
  845. (uri (string-append "https://download3.ebz.epson.net/dsc/f/03/00/12/99/"
  846. "78/73605b3f8aac63694fdabee6bd43389731696cd9/"
  847. "epson-inkjet-printer-escpr-1.7.17-1lsb3.2.tar.gz"))
  848. (sha256
  849. (base32 "1d7ckrl5kya98h27mx4pgnaz5sbrsd5vhwc8kva9nfah9wsga4wg"))))
  850. (build-system gnu-build-system)
  851. (arguments
  852. `(#:modules
  853. ((srfi srfi-26)
  854. ,@%gnu-build-system-modules)
  855. #:configure-flags
  856. `("--disable-static"
  857. ,(string-append "--prefix="
  858. (assoc-ref %outputs "out"))
  859. ,(string-append "--with-cupsfilterdir="
  860. (assoc-ref %outputs "out") "/lib/cups/filter")
  861. ,(string-append "--with-cupsppddir="
  862. (assoc-ref %outputs "out") "/share/cups/model"))
  863. #:phases
  864. (modify-phases %standard-phases
  865. (add-after 'unpack 'patch-autotools-version-requirement
  866. (lambda _
  867. (substitute* "aclocal.m4"
  868. (("1\\.15")
  869. ,(package-version automake)))
  870. (substitute* "configure"
  871. (("^(ACLOCAL=).*" _ match)
  872. (string-append match "aclocal"))
  873. (("^(AUTOMAKE=).*" _ match)
  874. (string-append match "automake")))
  875. #t))
  876. (add-after 'install 'compress-PPDs
  877. (lambda* (#:key outputs #:allow-other-keys)
  878. (let ((out (assoc-ref outputs "out")))
  879. (with-directory-excursion out
  880. (for-each (cut invoke "gzip" "-9" <>)
  881. (find-files "share/cups" "\\.ppd$")))))))))
  882. (native-inputs
  883. `(("autoconf" ,autoconf)
  884. ("automake" ,automake)))
  885. (inputs
  886. `(("cups" ,cups-minimal)))
  887. (synopsis "ESC/P-R printer driver")
  888. (description
  889. "This package provides a filter for @acronym{CUPS, the Common UNIX Printing
  890. System} that offers high-quality printing with Seiko@tie{}Epson color ink jet
  891. printers. It can be used only with printers that support the Epson@tie{}ESC/P-R
  892. language.")
  893. (home-page "http://download.ebz.epson.net/dsc/search/01/search/?OSC=LX")
  894. (license license:gpl2+)))
  895. (define-public escpr
  896. (deprecated-package "escpr" epson-inkjet-printer-escpr))
  897. (define-public splix
  898. ;; Last released in 2009 <https://sourceforge.net/projects/splix/files/>.
  899. ;; Last SVN commit was 2013 <https://svn.code.sf.net/p/splix/code/splix/>.
  900. ;; Use a more maintained fork with several bug fixes and support for newer
  901. ;; printer models.
  902. (let ((commit "76268c4dd7dbc8218ea7426401104c3b40cc707a")
  903. (revision "315"))
  904. (package
  905. (name "splix")
  906. (version (git-version "2.0.0" revision commit))
  907. (source
  908. (origin
  909. (method git-fetch)
  910. (uri (git-reference
  911. (url "https://gitlab.com/ScumCoder/splix")
  912. (commit commit)))
  913. (file-name (git-file-name name version))
  914. (sha256
  915. (base32 "1mxsvllwwr1v8sgrax0b7gkajjhnm0l06s67spmaxz47lyll1qab"))))
  916. (build-system gnu-build-system)
  917. ;; PPDs have been obsolete since CUPS 1.2 and make up 90% of total size.
  918. (outputs (list "out" "ppd"))
  919. (arguments
  920. `(#:modules
  921. ((srfi srfi-26)
  922. ,@%gnu-build-system-modules)
  923. #:make-flags
  924. (list (string-append "CUPSDRV="
  925. (assoc-ref %outputs "out") "/share/cups/drv")
  926. (string-append "CUPSFILTER="
  927. (assoc-ref %outputs "out") "/lib/cups/filter")
  928. (string-append "CUPSPPD="
  929. (assoc-ref %outputs "ppd") "/share/cups/model")
  930. "CACHESIZE=100" ; pages in RAM, ±300 KiB each
  931. "THREADS=4") ; compress and print faster
  932. #:phases
  933. (modify-phases %standard-phases
  934. (add-after 'unpack 'enter-subdirectory
  935. ;; The git repository replicates the top-level SVN layout.
  936. (lambda _
  937. (chdir "splix")
  938. #t))
  939. (delete 'configure) ; no configure script
  940. (add-before 'build 'build-.drv-files
  941. (lambda* (#:key make-flags #:allow-other-keys)
  942. (apply invoke "make" "drv" make-flags)))
  943. (add-after 'install 'install-.drv-files
  944. (lambda* (#:key make-flags #:allow-other-keys)
  945. (apply invoke "make" "install" "DRV_ONLY=1" make-flags)))
  946. (add-after 'install 'compress-PPDs
  947. (lambda* (#:key outputs #:allow-other-keys)
  948. (let ((ppd (assoc-ref outputs "ppd")))
  949. (for-each (cut invoke "gzip" "-9" <>)
  950. (find-files ppd "\\.ppd$"))))))
  951. #:tests? #f)) ; no test suite
  952. (inputs
  953. `(("cups" ,cups-minimal)
  954. ("jbigkit" ,jbigkit)
  955. ("zlib" ,zlib)))
  956. (synopsis "QPDL (SPL2) printer driver")
  957. (description
  958. "SpliX is a set of CUPS drivers for printers that speak @acronym{QPDL,
  959. Quick Page Description Language}, also called @acronym{SPL2, Samsung Printer
  960. Language version 2}. These include many laser printers sold by Samsung,
  961. Xerox, Lexmark, Toshiba, and Dell.
  962. Colour printers need colour profile files to get better results. These
  963. @file{cms} files are provided by the printer's manufacturer and must be
  964. obtained and installed separately.")
  965. (home-page "http://splix.ap2c.org/")
  966. (license license:gpl2))))
  967. (define-public python-pycups
  968. (package
  969. (name "python-pycups")
  970. (version "1.9.74")
  971. (source
  972. (origin
  973. (method url-fetch)
  974. (uri (pypi-uri "pycups" version ".tar.bz2"))
  975. (sha256
  976. (base32
  977. "1ffp7sswhdsfpy88zg0cc8kl04wygkjs01rlm9f0spbwk8jhy2c6"))))
  978. (build-system python-build-system)
  979. (arguments
  980. '(;; Tests require CUPS to be running
  981. #:tests? #f))
  982. (inputs
  983. `(("cups" ,cups)))
  984. (home-page "https://github.com/zdohnal/pycups")
  985. (synopsis "Python bindings for libcups")
  986. (description
  987. "This package provides Python bindings for libcups, wrapping the CUPS
  988. API.")
  989. (license license:gpl2+)))