gnu: usbguard: Use new package style.

Use G-exps and #$output while we're at it.

* gnu/packages/hardware.scm (usbguard)[arguments]: Use G-expressions.
<#:phases>: Use '#$output' instead of 'assoc-ref'

Signed-off-by: Tobias Geerinckx-Rice <me@tobias.gr>
This commit is contained in:
kiasoc5 via Guix-patches via 2022-08-14 09:03:29 -04:00 committed by Tobias Geerinckx-Rice
parent 53b2fda6fe
commit 9b176a05f9
No known key found for this signature in database
GPG Key ID: 0DB0FF884F556D79

View File

@ -1160,8 +1160,9 @@ applications.")
(base32 "0rc0213qsfap3sgx9m3m1kppxbjl2fdwmzlbn5rbmn1i33125dfi")))) (base32 "0rc0213qsfap3sgx9m3m1kppxbjl2fdwmzlbn5rbmn1i33125dfi"))))
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
'(#:phases (list
(modify-phases %standard-phases #:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'patch-bootstrap-script (add-after 'unpack 'patch-bootstrap-script
(lambda _ (lambda _
;; Don't attempt to fetch git submodules. ;; Don't attempt to fetch git submodules.
@ -1179,24 +1180,23 @@ applications.")
(substitute* "src/Tests/Makefile.in" (substitute* "src/Tests/Makefile.in"
(("\\$\\(am__append_2\\)") "")))) (("\\$\\(am__append_2\\)") ""))))
(add-after 'install 'delete-static-library (add-after 'install 'delete-static-library
(lambda* (#:key outputs #:allow-other-keys) (lambda args
;; It can't be direclty disabled since it's needed for the tests. ;; It can't be directly disabled since it's needed for the tests.
(delete-file (string-append (assoc-ref outputs "out") (delete-file (string-append #$output
"/lib/libusbguard.a")))) "/lib/libusbguard.a"))))
(add-after 'install 'install-zsh-completion (add-after 'install 'install-zsh-completion
(lambda* (#:key outputs #:allow-other-keys) (lambda args
(let* ((out (assoc-ref outputs "out")) (let ((site-functions
(site-functions (string-append #$output "/share/zsh/site-functions")))
(string-append out "/share/zsh/site-functions")))
(mkdir-p site-functions) (mkdir-p site-functions)
(copy-file "scripts/usbguard-zsh-completion" (copy-file "scripts/usbguard-zsh-completion"
(string-append site-functions "/_usbguard")))))) (string-append site-functions "/_usbguard"))))))
#:make-flags #:make-flags
(list (string-append "BASH_COMPLETION_DIR=" #~(list (string-append "BASH_COMPLETION_DIR="
(assoc-ref %outputs "out") #$output
"/etc/bash_completion.d")) "/etc/bash_completion.d"))
#:configure-flags #:configure-flags
(list #~(list
"--localstatedir=/var" "--localstatedir=/var"
"--enable-systemd=no" "--enable-systemd=no"
"--with-ldap" "--with-ldap"