rekahsoft-gnu/packages/golang.scm: Add zsh and bash completions for aws-vault

This commit is contained in:
Collin J. Doering 2020-12-30 20:03:32 -05:00
parent 467028585f
commit f0775dea30
Signed by: rekahsoft
GPG Key ID: 7B4DEB93212B3022

View File

@ -123,7 +123,18 @@ platforms. Gox will also build the cross-compilation toolchain for you.")
(arguments
'(#:import-path "github.com/99designs/aws-vault"
#:install-source? #f
#:phases %standard-phases))
#:phases
(modify-phases %standard-phases
(add-after 'build 'contrib
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(zsh-site-dir (string-append out "/share/zsh/site-functions"))
(bash-completion-dir (string-append out "/share/bash-completion/completions")))
(for-each mkdir-p `(,zsh-site-dir ,bash-completion-dir))
(with-directory-excursion "src/github.com/99designs/aws-vault"
(invoke "ls" "-la")
(install-file "completions/zsh/_aws-vault" (string-append zsh-site-dir "/_aws-vault"))
(install-file "completions/bash/aws-vault" (string-append bash-completion-dir "/aws-vault")))))))))
(synopsis
"Vault for securely storing and accessing AWS credentials in
development environments")