From 421a9e9d782804f9390c8a1f133800610e921f5f Mon Sep 17 00:00:00 2001 From: ng0 Date: Thu, 29 Dec 2016 11:42:43 +0000 Subject: [PATCH 1/2] gnu: Add hplip-qt5. * gnu/packages/cups.scm (hplip-qt5): New variable. --- gnu/packages/cups.scm | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/gnu/packages/cups.scm b/gnu/packages/cups.scm index accfe410b..608eda39b 100644 --- a/gnu/packages/cups.scm +++ b/gnu/packages/cups.scm @@ -5,6 +5,7 @@ ;;; Copyright © 2016 Danny Milosavljevic ;;; Copyright © 2017 Leo Famulari ;;; Copyright © 2017 Mark H Weaver +;;; Copyright © 2017 ng0 ;;; ;;; This file is part of GNU Guix. ;;; @@ -25,6 +26,7 @@ #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix download) + #:use-module (guix utils) #:use-module (guix build-system gnu) #:use-module (gnu packages) #:use-module (gnu packages avahi) @@ -40,7 +42,8 @@ #:use-module (gnu packages glib) #:use-module (gnu packages pdf) #:use-module (gnu packages pkg-config) - #:use-module (gnu packages tls)) + #:use-module (gnu packages tls) + #:use-module (gnu packages qt)) ;; Delay to avoid module circularity problems. (define ghostscript/cups @@ -445,3 +448,38 @@ device-specific programs to convert and print many types of files.") ;; TODO: Make hp-setup find python-dbus. ("python-dbus" ,python-dbus))) (native-inputs `(("pkg-config" ,pkg-config))))) + +(define-public hplip-qt5 + (package + (inherit hplip) + (name "hplip-qt5") + (arguments + `(,@(substitute-keyword-arguments (package-arguments hplip) + ((#:configure-flags flags ''()) + `("--disable-network-build" + ,(string-append "--prefix=" (assoc-ref %outputs "out")) + ,(string-append "--sysconfdir=" (assoc-ref %outputs "out") "/etc") + ;; Disable until mime.types merging works (FIXME). + "--disable-fax-build" + "--enable-hpcups-install" + "--enable-new-hpcups" + "--enable-cups_ppd_install" + "--enable-cups_drv_install" + "--enable-gui-build" + "--disable-qt4" + "--enable-qt5" + ;; TODO add foomatic drv install eventually. + ;; TODO --enable-policykit eventually. + ,(string-append "--with-cupsfilterdir=" + (assoc-ref %outputs "out") "/lib/cups/filter") + ,(string-append "--with-cupsbackenddir=" + (assoc-ref %outputs "out") "/lib/cups/backend") + ,(string-append "--with-icondir=" + (assoc-ref %outputs "out") "/share/applications") + ,(string-append "--with-systraydir=" + (assoc-ref %outputs "out") "/etc/xdg")))))) + (inputs + `(("python-pyqt" ,python-pyqt) + ("python-pygobject" ,python-pygobject) + ("python-sip" ,python-sip) + ,@(package-inputs hplip))))) -- 2.13.0