gnu: boxes: Match over CAR/CDR.
* gnu/packages/shellutils.scm (boxes)[arguments]: Import (ice-9 match) and use it to replace the 'install phases's CAR & CDR usage.
This commit is contained in:
parent
ed0215d3f9
commit
980146637c
@ -72,18 +72,22 @@
|
|||||||
#:make-flags (list (string-append "GLOBALCONF="
|
#:make-flags (list (string-append "GLOBALCONF="
|
||||||
(assoc-ref %outputs "out")
|
(assoc-ref %outputs "out")
|
||||||
"/etc/boxes-config"))
|
"/etc/boxes-config"))
|
||||||
|
#:modules
|
||||||
|
((ice-9 match)
|
||||||
|
,@%gnu-build-system-modules)
|
||||||
#:phases
|
#:phases
|
||||||
(modify-phases %standard-phases
|
(modify-phases %standard-phases
|
||||||
(delete 'configure)
|
(delete 'configure)
|
||||||
(replace 'install
|
(replace 'install
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
(let ((dest (assoc-ref outputs "out")))
|
(let ((out (assoc-ref outputs "out")))
|
||||||
(for-each (lambda (x)
|
(for-each (match-lambda
|
||||||
(install-file (car x)
|
((source target)
|
||||||
(string-append dest "/" (cdr x))))
|
(install-file source
|
||||||
'(("out/boxes" . "bin")
|
(string-append out "/" target))))
|
||||||
("doc/boxes.1" . "share/man/man1")
|
'(("out/boxes" "bin/")
|
||||||
("boxes-config" . "etc/")))))))))
|
("doc/boxes.1" "share/man/man1/")
|
||||||
|
("boxes-config" "etc/")))))))))
|
||||||
(native-inputs
|
(native-inputs
|
||||||
`(("bison" ,bison)
|
`(("bison" ,bison)
|
||||||
("flex" ,flex)
|
("flex" ,flex)
|
||||||
|
Loading…
Reference in New Issue
Block a user