me
/
guix
Archived
1
0
Fork 0

gnu: mdadm-static: Use G-expressions.

* gnu/packages/linux.scm (mdadm-static)[arguments]:
Rewrite as G-expressions.

Reported by Christopher Baines <mail@cbaines.net>
master
Tobias Geerinckx-Rice 2022-01-06 16:56:18 +01:00
parent af1b5de6d8
commit 55bf2d31e9
No known key found for this signature in database
GPG Key ID: 0DB0FF884F556D79
1 changed files with 12 additions and 13 deletions

View File

@ -5078,20 +5078,19 @@ arrays when needed.")
(arguments
(substitute-keyword-arguments (package-arguments mdadm)
((#:make-flags flags)
`(cons "LDFLAGS = -static" ,flags))
#~(cons "LDFLAGS = -static" #$flags))
((#:phases phases)
`(modify-phases ,phases
(add-after 'install 'remove-cruft
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(precious? (lambda (file)
(member file '("." ".." "sbin"))))
(directories (scandir out (negate precious?))))
(with-directory-excursion out
(for-each delete-file-recursively directories)
(remove-store-references "sbin/mdadm")
(delete-file "sbin/mdmon")
#t))))))
#~(modify-phases #$phases
(add-after 'install 'remove-cruft
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(precious? (lambda (file)
(member file '("." ".." "sbin"))))
(directories (scandir out (negate precious?))))
(with-directory-excursion out
(for-each delete-file-recursively directories)
(remove-store-references "sbin/mdadm")
(delete-file "sbin/mdmon")))))))
((#:modules modules %gnu-build-system-modules)
`((ice-9 ftw) ,@modules))
((#:strip-flags _ '())