summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorTobias Geerinckx-Rice <me@tobias.gr>2021-10-21 22:18:38 +0200
committerTobias Geerinckx-Rice <me@tobias.gr>2021-10-21 22:19:27 +0200
commit980146637ceed18e1d72900ea95bc61a8367d7fa (patch)
tree8bac7f33166a00e91b58214de25b11514cd3a33d /gnu
parented0215d3f90ca7d55ed878563131a48adfd95195 (diff)
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.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/shellutils.scm18
1 files changed, 11 insertions, 7 deletions
diff --git a/gnu/packages/shellutils.scm b/gnu/packages/shellutils.scm
index dd13d5dd13..3ded0ee897 100644
--- a/gnu/packages/shellutils.scm
+++ b/gnu/packages/shellutils.scm
@@ -72,18 +72,22 @@
#: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)