me
/
guix
Archived
1
0
Fork 0

gnu: hplip: Add Qt GUI support.

Some tools (like ‘hp-toolbox’) still refuse to launch, but at least
others (like ‘hp-systrax’) now seem to work.

* gnu/packages/cups.scm (hplip)[arguments]: Add #configure-flags for Qt.
[inputs]: Add python-gobject and python-pyqt.
master
Tobias Geerinckx-Rice 2018-06-19 20:02:42 +02:00
parent 058df6cd0a
commit 407ef4b38a
No known key found for this signature in database
GPG Key ID: 0DB0FF884F556D79
1 changed files with 25 additions and 16 deletions

View File

@ -40,6 +40,7 @@
#:use-module (gnu packages pkg-config) #:use-module (gnu packages pkg-config)
#:use-module (gnu packages pretty-print) #:use-module (gnu packages pretty-print)
#:use-module (gnu packages python) #:use-module (gnu packages python)
#:use-module (gnu packages qt)
#:use-module (gnu packages scanner) #:use-module (gnu packages scanner)
#:use-module (gnu packages tls) #:use-module (gnu packages tls)
#:use-module (guix build-system gnu) #:use-module (guix build-system gnu)
@ -424,7 +425,8 @@ device-specific programs to convert and print many types of files.")
,(string-append "--with-icondir=" ,(string-append "--with-icondir="
(assoc-ref %outputs "out") "/share/applications") (assoc-ref %outputs "out") "/share/applications")
,(string-append "--with-systraydir=" ,(string-append "--with-systraydir="
(assoc-ref %outputs "out") "/etc/xdg")) (assoc-ref %outputs "out") "/etc/xdg")
"--enable-qt5" "--disable-qt4")
#:imported-modules ((guix build python-build-system) #:imported-modules ((guix build python-build-system)
,@%gnu-build-system-modules) ,@%gnu-build-system-modules)
@ -463,7 +465,7 @@ device-specific programs to convert and print many types of files.")
(string-append "hplip_confdir = " out (string-append "hplip_confdir = " out
"/etc/hp")) "/etc/hp"))
(("halpredir = /usr/share/hal/fdi/preprobe/10osvendor") (("halpredir = /usr/share/hal/fdi/preprobe/10osvendor")
;; Note: We don't use hal. ;; We don't use hal.
(string-append "halpredir = " out (string-append "halpredir = " out
"/share/hal/fdi/preprobe/10osvendor")) "/share/hal/fdi/preprobe/10osvendor"))
(("rulesdir = /etc/udev/rules.d") (("rulesdir = /etc/udev/rules.d")
@ -477,23 +479,30 @@ device-specific programs to convert and print many types of files.")
(("/etc/sane.d") (("/etc/sane.d")
(string-append out "/etc/sane.d")))))) (string-append out "/etc/sane.d"))))))
;; Wrap bin/* so that the Python libs are found. ;; Wrap bin/* so that the Python libraries are found.
(add-after 'install 'wrap-binaries (add-after 'install 'wrap-binaries
(assoc-ref python:%standard-phases 'wrap))))) (assoc-ref python:%standard-phases 'wrap)))))
;; Python3 support is available starting from hplip@3.15.2. ;; Note that the error messages printed by the tools in the case of
(inputs `(("libjpeg" ,libjpeg) ;; missing dependencies are often downright misleading.
("cups-minimal" ,cups-minimal) ;; TODO: hp-toolbox still fails to start with:
("libusb" ,libusb) ;; from dbus.mainloop.pyqt5 import DBusQtMainLoop
("sane-backends" ,sane-backends-minimal) ;; ModuleNotFoundError: No module named 'dbus.mainloop.pyqt5'
("zlib" ,zlib) (inputs
`(("cups-minimal" ,cups-minimal)
("dbus" ,dbus) ("dbus" ,dbus)
("python-wrapper" ,python-wrapper) ("libjpeg" ,libjpeg)
("libusb" ,libusb)
("python" ,python) ("python" ,python)
;; TODO: Make hp-setup find python-dbus. ("python-dbus" ,python-dbus)
("python-dbus" ,python-dbus))) ("python-pygobject" ,python-pygobject)
(native-inputs `(("pkg-config" ,pkg-config) ("python-pyqt" ,python-pyqt)
("perl" ,perl))))) ("python-wrapper" ,python-wrapper)
("sane-backends" ,sane-backends-minimal)
("zlib" ,zlib)))
(native-inputs
`(("perl" ,perl)
("pkg-config" ,pkg-config)))))
(define-public foomatic-filters (define-public foomatic-filters
(package (package