summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorTobias Geerinckx-Rice <me@tobias.gr>2020-11-18 15:52:26 +0100
committerTobias Geerinckx-Rice <me@tobias.gr>2020-11-18 18:07:42 +0100
commit359a195eff63d16f36e411409abe6cd71c13a4d1 (patch)
treea1b84694214d76d524f0305397a01ca71e27abde /gnu
parenta25362a5c12507360953b507a18320edef81167f (diff)
gnu: splix: Compress PPDs.
* gnu/packages/cups.scm (splix)[arguments]: Import SRFI-26 and add a ‘compress-PPDs’ phase.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/cups.scm12
1 files changed, 10 insertions, 2 deletions
diff --git a/gnu/packages/cups.scm b/gnu/packages/cups.scm
index 3f0cdb7468..cdfb9643c0 100644
--- a/gnu/packages/cups.scm
+++ b/gnu/packages/cups.scm
@@ -819,7 +819,10 @@ language.")
;; PPDs have been obsolete since CUPS 1.2 and make up 90% of total size.
(outputs (list "out" "ppd"))
(arguments
- '(#:make-flags
+ `(#:modules
+ ((srfi srfi-26)
+ ,@%gnu-build-system-modules)
+ #:make-flags
(list (string-append "CUPSDRV="
(assoc-ref %outputs "out") "/share/cups/drv")
(string-append "CUPSFILTER="
@@ -841,7 +844,12 @@ language.")
(apply invoke "make" "drv" make-flags)))
(add-after 'install 'install-.drv-files
(lambda* (#:key make-flags #:allow-other-keys)
- (apply invoke "make" "install" "DRV_ONLY=1" make-flags))))
+ (apply invoke "make" "install" "DRV_ONLY=1" make-flags)))
+ (add-after 'install 'compress-PPDs
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((ppd (assoc-ref outputs "ppd")))
+ (for-each (cut invoke "gzip" "-9" <>)
+ (find-files ppd "\\.ppd$"))))))
#:tests? #f)) ; no test suite
(inputs
`(("cups" ,cups-minimal)