aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/password-utils.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/password-utils.scm')
-rw-r--r--gnu/packages/password-utils.scm25
1 files changed, 23 insertions, 2 deletions
diff --git a/gnu/packages/password-utils.scm b/gnu/packages/password-utils.scm
index cb8dacc3ea..0a3b4b64e7 100644
--- a/gnu/packages/password-utils.scm
+++ b/gnu/packages/password-utils.scm
@@ -36,6 +36,7 @@
#:use-module (gnu packages compression)
#:use-module (gnu packages glib)
#:use-module (gnu packages gnupg)
+ #:use-module (gnu packages gtk)
#:use-module (gnu packages guile)
#:use-module (gnu packages linux)
#:use-module (gnu packages man)
@@ -240,6 +241,15 @@ random passwords that pass the checks.")
#:tests? #f
#:phases
(modify-phases %standard-phases
+ (add-after 'install 'wrap-assword
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((prog (string-append
+ (assoc-ref outputs "out")
+ "/bin/assword"))
+ (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
+ (wrap-program prog
+ `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path)))
+ #t)))
(add-after 'install 'manpage
(lambda* (#:key outputs #:allow-other-keys)
(and
@@ -255,7 +265,8 @@ random passwords that pass the checks.")
(native-inputs
`(("txt2man" ,txt2man)))
(inputs
- `(("python-xdo" ,python-xdo)
+ `(("gtk+" ,gtk+)
+ ("python-xdo" ,python-xdo)
("python-gpg" ,python-gpg)
("python-pygobject" ,python-pygobject)))
(propagated-inputs
@@ -294,7 +305,17 @@ any X11 window.")
'("coreutils" "getopt" "git" "gnupg" "pwgen"
"sed" "tree" "which" "xclip"))))
(wrap-program (string-append out "/bin/pass")
- `("PATH" ":" prefix (,(string-join path ":"))))))))
+ `("PATH" ":" prefix (,(string-join path ":"))))
+ #t)))
+ (add-after 'wrap-path 'install-shell-completions
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bashcomp (string-append out "/etc/bash_completion.d")))
+ ;; TODO: install fish and zsh completions.
+ (mkdir-p bashcomp)
+ (copy-file "src/completion/pass.bash-completion"
+ (string-append bashcomp "/pass"))
+ #t))))
#:make-flags (list "CC=gcc" (string-append "PREFIX=" %output))
;; Parallel tests may cause a race condition leading to a
;; timeout in some circumstances.