mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-15 03:15:09 -05:00
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
1 changed files with 11 additions and 7 deletions
|
@ -72,18 +72,22 @@ (define-public boxes
|
|||
#:make-flags (list (string-append "GLOBALCONF="
|
||||
(assoc-ref %outputs "out")
|
||||
"/etc/boxes-config"))
|
||||
#:modules
|
||||
((ice-9 match)
|
||||
,@%gnu-build-system-modules)
|
||||
#:phases
|
||||
(modify-phases %standard-phases
|
||||
(delete 'configure)
|
||||
(replace 'install
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
(let ((dest (assoc-ref outputs "out")))
|
||||
(for-each (lambda (x)
|
||||
(install-file (car x)
|
||||
(string-append dest "/" (cdr x))))
|
||||
'(("out/boxes" . "bin")
|
||||
("doc/boxes.1" . "share/man/man1")
|
||||
("boxes-config" . "etc/")))))))))
|
||||
(let ((out (assoc-ref outputs "out")))
|
||||
(for-each (match-lambda
|
||||
((source target)
|
||||
(install-file source
|
||||
(string-append out "/" target))))
|
||||
'(("out/boxes" "bin/")
|
||||
("doc/boxes.1" "share/man/man1/")
|
||||
("boxes-config" "etc/")))))))))
|
||||
(native-inputs
|
||||
`(("bison" ,bison)
|
||||
("flex" ,flex)
|
||||
|
|
Loading…
Reference in a new issue