aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/cups.scm
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2019-03-21 23:18:54 +0100
committerMarius Bakke <mbakke@fastmail.com>2019-03-21 23:18:54 +0100
commit081850816f98c7f5d815ac7251c69bf2ada50cc0 (patch)
tree609b7e9e9c267e8c382bdebf8295b9f45bab6cc4 /gnu/packages/cups.scm
parent792d526a256773d1abe00b73c2a2131037148139 (diff)
parent93f178b5a84a8cc5a0c552290191efd2310588b5 (diff)
downloadguix-081850816f98c7f5d815ac7251c69bf2ada50cc0.tar
guix-081850816f98c7f5d815ac7251c69bf2ada50cc0.tar.gz
Merge branch 'master' into staging
Diffstat (limited to 'gnu/packages/cups.scm')
-rw-r--r--gnu/packages/cups.scm40
1 files changed, 32 insertions, 8 deletions
diff --git a/gnu/packages/cups.scm b/gnu/packages/cups.scm
index bae9a40e3a..fdd9e80bd4 100644
--- a/gnu/packages/cups.scm
+++ b/gnu/packages/cups.scm
@@ -1,6 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
-;;; Copyright © 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2015, 2016, 2017, 2019 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2015, 2016, 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016 Danny Milosavljevic <dannym@scratchpost.org>
;;; Copyright © 2017 Leo Famulari <leo@famulari.name>
@@ -51,7 +51,8 @@
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix utils)
- #:use-module (srfi srfi-1))
+ #:use-module (srfi srfi-1)
+ #:use-module (ice-9 match))
(define-public cups-filters
(package
@@ -429,12 +430,26 @@ should only be used as part of the Guix cups-pk-helper service.")
(patches (search-patches "hplip-remove-imageprocessor.patch"))
(snippet
'(begin
- ;; Delete non-free blobs
- (for-each delete-file (find-files "." "\\.so$"))
+ ;; Delete non-free blobs: .so files, pre-compiled
+ ;; 'locatedriver' executable, etc.
+ (for-each delete-file
+ (find-files "."
+ (lambda (file stat)
+ (elf-file? file))))
(delete-file "prnt/hpcups/ImageProcessor.h")
+
;; Fix type mismatch.
(substitute* "prnt/hpcups/genPCLm.cpp"
(("boolean") "bool"))
+
+ ;; Install binaries under libexec/hplip instead of
+ ;; share/hplip; that'll at least ensure they get stripped.
+ ;; It's not even clear that they're of any use though...
+ (substitute* "Makefile.in"
+ (("^dat2drvdir =.*")
+ "dat2drvdir = $(pkglibexecdir)\n")
+ (("^locatedriverdir =.*")
+ "locatedriverdir = $(pkglibexecdir)\n"))
#t))))
(build-system gnu-build-system)
(home-page "https://developers.hp.com/hp-linux-imaging-and-printing")
@@ -556,10 +571,19 @@ should only be used as part of the Guix cups-pk-helper service.")
(arguments
(substitute-keyword-arguments (package-arguments hplip)
((#:configure-flags cf)
- `(delete "--enable-qt5" ,cf))))
- (inputs
- (fold alist-delete (package-inputs hplip)
- '("python-pygobject" "python-pyqt")))
+ ;; Produce a "light build", meaning that only the printer (CUPS) and
+ ;; scanner (SANE) support gets built, without all the 'hp-*'
+ ;; command-line tools.
+ `(cons "--enable-lite-build"
+ (delete "--enable-qt5" ,cf)))
+ ((#:phases phases)
+ ;; The 'wrap-binaries' is not needed here since the 'hp-*' programs
+ ;; are not installed.
+ `(alist-delete 'wrap-binaries ,phases))))
+ (inputs (remove (match-lambda
+ ((label . _)
+ (string-prefix? "python" label)))
+ (package-inputs hplip)))
(synopsis "GUI-less version of hplip")))
(define-public foomatic-filters