gnu: password-store: Improve style.

* gnu/packages/password-utils.scm (password-store)[arguments]: Use
G-Expressions.

Change-Id: If9ffc75174f401cd00acfee84844f718ab57b24f
Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
This commit is contained in:
Cayetano Santos 2025-09-16 16:32:49 +02:00 committed by Liliana Marie Prikler
parent bea4bc442b
commit f1ffccf1d0
No known key found for this signature in database
GPG key ID: 442A84B8C70E2F87

View file

@ -856,7 +856,8 @@ any X11 window.")
(package (package
(name "password-store") (name "password-store")
(version "1.7.4") (version "1.7.4")
(source (origin (source
(origin
(method git-fetch) (method git-fetch)
(uri (git-reference (uri (git-reference
(url "git://git.zx2c4.com/password-store") (url "git://git.zx2c4.com/password-store")
@ -868,22 +869,31 @@ any X11 window.")
(file-name (git-file-name name version)))) (file-name (git-file-name name version))))
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
'(#:phases (list
(modify-phases %standard-phases #:make-flags
#~(list (string-append "CC=" #$(cc-for-target))
(string-append "PREFIX=" #$output)
"WITH_ALLCOMP=yes"
(string-append "BASHCOMPDIR=" #$output "/etc/bash_completion.d"))
;; Parallel tests may cause a race condition leading to a
;; timeout in some circumstances.
#:parallel-tests? #f
#:test-target "test"
#:phases
#~(modify-phases %standard-phases
(delete 'configure) (delete 'configure)
(delete 'build) (delete 'build)
(add-before 'install 'patch-system-extension-dir (add-before 'install 'patch-system-extension-dir
(lambda* (#:key outputs #:allow-other-keys) (lambda _
(let* ((out (assoc-ref outputs "out"))
(extension-dir (string-append out "/lib/password-store/extensions")))
(substitute* "src/password-store.sh" (substitute* "src/password-store.sh"
(("^SYSTEM_EXTENSION_DIR=.*$") (("^SYSTEM_EXTENSION_DIR=.*$")
;; lead with whitespace to prevent 'make install' from ;; lead with whitespace to prevent 'make install' from
;; overwriting it again ;; overwriting it again
(string-append " SYSTEM_EXTENSION_DIR=\"" (string-append
" SYSTEM_EXTENSION_DIR=\""
"${PASSWORD_STORE_SYSTEM_EXTENSION_DIR:-" "${PASSWORD_STORE_SYSTEM_EXTENSION_DIR:-"
extension-dir (string-append #$output "/lib/password-store/extensions")
"}\"\n")))))) "}\"\n")))))
(add-before 'install 'patch-program-name (add-before 'install 'patch-program-name
;; Use pass not .pass-real in tmpdir and cmd_usage ;; Use pass not .pass-real in tmpdir and cmd_usage
(lambda _ (lambda _
@ -898,36 +908,26 @@ any X11 window.")
(lambda* (#:key inputs #:allow-other-keys) (lambda* (#:key inputs #:allow-other-keys)
(substitute* "contrib/dmenu/passmenu" (substitute* "contrib/dmenu/passmenu"
(("dmenu=dmenu\n") (("dmenu=dmenu\n")
(string-append "dmenu=" (string-append
(search-input-file inputs "/bin/dmenu") "dmenu=" (search-input-file inputs "/bin/dmenu") "\n"))
"\n"))
(("xdotool=\"xdotool") (("xdotool=\"xdotool")
(string-append "xdotool=\"" (string-append
(search-input-file inputs "/bin/xdotool")))))) "xdotool=\"" (search-input-file inputs "/bin/xdotool"))))))
(add-after 'install 'install-passmenu (add-after 'install 'install-passmenu
(lambda* (#:key outputs #:allow-other-keys) (lambda _
(let* ((out (assoc-ref outputs "out")) (install-file
(bin (string-append out "/bin"))) "contrib/dmenu/passmenu" (string-append #$output "/bin"))))
(install-file "contrib/dmenu/passmenu" bin))))
(add-after 'install 'wrap-path (add-after 'install 'wrap-path
(lambda* (#:key inputs outputs #:allow-other-keys) (lambda* (#:key inputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out")) (let* ((requisites '("getopt" "git" "gpg" "qrencode" "sed"
(requisites '("getopt" "git" "gpg" "qrencode" "sed"
"tail" "tree" "which" "wl-copy" "xclip")) "tail" "tree" "which" "wl-copy" "xclip"))
(path (map (lambda (pkg) (path
(map (lambda (pkg)
(dirname (search-input-file (dirname (search-input-file
inputs (string-append "/bin/" pkg)))) inputs (string-append "/bin/" pkg))))
requisites))) requisites)))
(wrap-program (string-append out "/bin/pass") (wrap-program (string-append #$output "/bin/pass")
`("PATH" ":" prefix (,(string-join path ":")))))))) `("PATH" ":" prefix (,(string-join path ":"))))))))))
#:make-flags (list "CC=gcc" (string-append "PREFIX=" %output)
"WITH_ALLCOMP=yes"
(string-append "BASHCOMPDIR="
%output "/etc/bash_completion.d"))
;; Parallel tests may cause a race condition leading to a
;; timeout in some circumstances.
#:parallel-tests? #f
#:test-target "test"))
(native-search-paths (native-search-paths
(list (search-path-specification (list (search-path-specification
(variable "PASSWORD_STORE_SYSTEM_EXTENSION_DIR") (variable "PASSWORD_STORE_SYSTEM_EXTENSION_DIR")
@ -937,12 +937,12 @@ any X11 window.")
(list bash-minimal (list bash-minimal
coreutils coreutils
dmenu dmenu
util-linux
git git
gnupg gnupg
qrencode qrencode
sed sed
tree tree
util-linux
which which
wl-clipboard wl-clipboard
xclip xclip