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:
parent
53b2fda6fe
commit
9b176a05f9
|
@ -1160,48 +1160,48 @@ (define-public usbguard
|
||||||
(base32 "0rc0213qsfap3sgx9m3m1kppxbjl2fdwmzlbn5rbmn1i33125dfi"))))
|
(base32 "0rc0213qsfap3sgx9m3m1kppxbjl2fdwmzlbn5rbmn1i33125dfi"))))
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
'(#:phases
|
(list
|
||||||
(modify-phases %standard-phases
|
#:phases
|
||||||
(add-after 'unpack 'patch-bootstrap-script
|
#~(modify-phases %standard-phases
|
||||||
(lambda _
|
(add-after 'unpack 'patch-bootstrap-script
|
||||||
;; Don't attempt to fetch git submodules.
|
(lambda _
|
||||||
(substitute* "autogen.sh"
|
;; Don't attempt to fetch git submodules.
|
||||||
(("^git submodule.*")
|
(substitute* "autogen.sh"
|
||||||
""))))
|
(("^git submodule.*")
|
||||||
(add-after 'bootstrap 'patch-build-scripts
|
""))))
|
||||||
(lambda* (#:key inputs #:allow-other-keys)
|
(add-after 'bootstrap 'patch-build-scripts
|
||||||
(substitute* "configure"
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
(("/usr/include/catch")
|
(substitute* "configure"
|
||||||
(dirname (search-input-file inputs "include/catch.hpp"))))
|
(("/usr/include/catch")
|
||||||
;; Do not create log directory.
|
(dirname (search-input-file inputs "include/catch.hpp"))))
|
||||||
(substitute* "Makefile.in" ((".*/log/usbguard.*") ""))
|
;; Do not create log directory.
|
||||||
;; Disable LDAP tests: they use 'sudo'.
|
(substitute* "Makefile.in" ((".*/log/usbguard.*") ""))
|
||||||
(substitute* "src/Tests/Makefile.in"
|
;; Disable LDAP tests: they use 'sudo'.
|
||||||
(("\\$\\(am__append_2\\)") ""))))
|
(substitute* "src/Tests/Makefile.in"
|
||||||
(add-after 'install 'delete-static-library
|
(("\\$\\(am__append_2\\)") ""))))
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(add-after 'install 'delete-static-library
|
||||||
;; It can't be direclty disabled since it's needed for the tests.
|
(lambda args
|
||||||
(delete-file (string-append (assoc-ref outputs "out")
|
;; It can't be directly disabled since it's needed for the tests.
|
||||||
"/lib/libusbguard.a"))))
|
(delete-file (string-append #$output
|
||||||
(add-after 'install 'install-zsh-completion
|
"/lib/libusbguard.a"))))
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(add-after 'install 'install-zsh-completion
|
||||||
(let* ((out (assoc-ref outputs "out"))
|
(lambda args
|
||||||
(site-functions
|
(let ((site-functions
|
||||||
(string-append out "/share/zsh/site-functions")))
|
(string-append #$output "/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"
|
||||||
"--with-dbus"
|
"--with-dbus"
|
||||||
"--with-polkit")))
|
"--with-polkit")))
|
||||||
(inputs
|
(inputs
|
||||||
(list audit
|
(list audit
|
||||||
catch-framework
|
catch-framework
|
||||||
|
|
Loading…
Reference in a new issue