rekahsoft-gnu/packages/golang.scm: aws-vault improvements

- Do no use a 'v' in the version
- Add fish completions
- Put completions in correct place (they were slightly off before)
- Return #t from phases to avoid warnings
This commit is contained in:
Collin J. Doering 2021-01-01 18:48:25 -05:00
parent aedd58ce31
commit abffdcff72
Signed by: rekahsoft
GPG Key ID: 7B4DEB93212B3022
1 changed files with 13 additions and 9 deletions

View File

@ -118,12 +118,12 @@ platforms. Gox will also build the cross-compilation toolchain for you.")
(define-public aws-vault
(package
(name "aws-vault")
(version "v6.2.0")
(version "6.2.0")
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/99designs/aws-vault")
(commit version)))
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32
@ -154,18 +154,22 @@ platforms. Gox will also build the cross-compilation toolchain for you.")
(add-before 'build 'patch-version
(lambda _
(substitute* "src/github.com/99designs/aws-vault/main.go"
(("var Version = \"dev\"") (string-append "var Version = \"" ,version "\"")))))
(("var Version = \"dev\"") (string-append "var Version = \"v" ,version "\"")))))
(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"
(copy-file "contrib/completions/zsh/aws-vault.zsh"
(bash-completion-dir (string-append out "/share/bash-completion/completions"))
(fish-completion-dir (string-append out "/share/fish/completions")))
(for-each mkdir-p `(,zsh-site-dir ,bash-completion-dir ,fish-completion-dir))
(with-directory-excursion "src/github.com/99designs/aws-vault/contrib/completions"
(copy-file "zsh/aws-vault.zsh"
(string-append zsh-site-dir "/_aws-vault"))
(copy-file "contrib/completions/bash/aws-vault.bash"
(string-append bash-completion-dir "/aws-vault")))))))))
(copy-file "bash/aws-vault.bash"
(string-append bash-completion-dir "/aws-vault"))
(copy-file "fish/aws-vault.fish"
(string-append fish-completion-dir "/aws-vault.fish")))
#t))))))
(synopsis
"Vault for securely storing and accessing AWS credentials in
development environments")