gnu: cups-filters: Wrap with grep.
* gnu/packages/cups.scm (cups-filters)[inputs]: Add grep. [arguments]: Wrap all filters with it in $PATH.
This commit is contained in:
parent
7467f9857d
commit
e943343912
1 changed files with 8 additions and 5 deletions
|
|
@ -28,6 +28,7 @@
|
||||||
#:use-module (gnu packages algebra)
|
#:use-module (gnu packages algebra)
|
||||||
#:use-module (gnu packages autotools)
|
#:use-module (gnu packages autotools)
|
||||||
#:use-module (gnu packages avahi)
|
#:use-module (gnu packages avahi)
|
||||||
|
#:use-module (gnu packages base)
|
||||||
#:use-module (gnu packages compression)
|
#:use-module (gnu packages compression)
|
||||||
#:use-module (gnu packages fonts) ; font-dejavu
|
#:use-module (gnu packages fonts) ; font-dejavu
|
||||||
#:use-module (gnu packages fontutils)
|
#:use-module (gnu packages fontutils)
|
||||||
|
|
@ -127,17 +128,18 @@
|
||||||
#t)))
|
#t)))
|
||||||
(add-after 'install 'wrap-filters
|
(add-after 'install 'wrap-filters
|
||||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||||
;; Some filters expect to find 'gs' in $PATH. We cannot
|
;; Some filters expect to find things in $PATH. We cannot
|
||||||
;; just hard-code its absolute file name in the source
|
;; just hard-code all absolute file names in the source
|
||||||
;; because foomatic-rip, for example, has tests like
|
;; because foomatic-rip, for example, has tests like
|
||||||
;; 'startswith(cmd, "gs")'.
|
;; 'startswith(cmd, "gs")'.
|
||||||
(let ((out (assoc-ref outputs "out"))
|
(let ((out (assoc-ref outputs "out"))
|
||||||
(ghostscript (assoc-ref inputs "ghostscript")))
|
(ghostscript (assoc-ref inputs "ghostscript"))
|
||||||
|
(grep (assoc-ref inputs "grep")))
|
||||||
(for-each (lambda (file)
|
(for-each (lambda (file)
|
||||||
(wrap-program file
|
(wrap-program file
|
||||||
`("PATH" ":" prefix
|
`("PATH" ":" prefix
|
||||||
(,(string-append ghostscript
|
(,(string-append ghostscript "/bin:"
|
||||||
"/bin")))))
|
grep "/bin")))))
|
||||||
(find-files (string-append
|
(find-files (string-append
|
||||||
out "/lib/cups/filter")))
|
out "/lib/cups/filter")))
|
||||||
#t))))))
|
#t))))))
|
||||||
|
|
@ -150,6 +152,7 @@
|
||||||
("freetype" ,freetype)
|
("freetype" ,freetype)
|
||||||
("font-dejavu" ,font-dejavu) ; also needed by test suite
|
("font-dejavu" ,font-dejavu) ; also needed by test suite
|
||||||
("ghostscript" ,ghostscript/cups)
|
("ghostscript" ,ghostscript/cups)
|
||||||
|
("grep" ,grep)
|
||||||
("ijs" ,ijs)
|
("ijs" ,ijs)
|
||||||
("dbus" ,dbus)
|
("dbus" ,dbus)
|
||||||
("lcms" ,lcms)
|
("lcms" ,lcms)
|
||||||
|
|
|
||||||
Reference in a new issue