gnu: aws-vault: Move to password-utils.

* gnu/packages/golang.scm (aws-vault): Move from here ...
* gnu/packages/password-utils.scm: ... to here.

Change-Id: I530c13fb88c48e3e0f660da6a1aed053a5435ed4
This commit is contained in:
Sharlatan Hellseher 2025-01-09 23:57:51 +00:00
parent bc5a4aa143
commit bb5be6b0fb
No known key found for this signature in database
GPG key ID: 76D727BFF62CD2B5
2 changed files with 78 additions and 77 deletions

View file

@ -3072,83 +3072,6 @@ parser.")
(home-page "https://github.com/mtibben/percent")
(license license:expat)))
(define-public aws-vault
(package
(name "aws-vault")
(version "7.2.0")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/99designs/aws-vault")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32 "1dqg6d2k8r80ww70afghf823z0pijha1i0a0c0c6918yb322zkj2"))))
(build-system go-build-system)
(arguments
(list
#:install-source? #f
#:import-path "github.com/99designs/aws-vault"
#:phases
#~(modify-phases %standard-phases
(add-before 'build 'patch-version
(lambda _
(substitute* "src/github.com/99designs/aws-vault/main.go"
(("var Version = \"dev\"")
(string-append "var Version = \"v" #$version "\"")))))
(add-after 'build 'contrib
(lambda* (#:key import-path #:allow-other-keys)
(let* ((zsh-site-dir
(string-append #$output "/share/zsh/site-functions"))
(bash-completion-dir
(string-append #$output "/share/bash-completion/completions"))
(fish-completion-dir
(string-append #$output "/share/fish/completions")))
(for-each mkdir-p (list bash-completion-dir
fish-completion-dir
zsh-site-dir))
(with-directory-excursion
(string-append "src/" import-path "/contrib/completions")
(copy-file "zsh/aws-vault.zsh"
(string-append zsh-site-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"))))))
;; aws-vault: error: add: mkdir /homeless-shelter: permission
;; denied.
(add-before 'check 'set-home
(lambda _
(setenv "HOME" "/tmp"))))))
(native-inputs
(list go-github-com-99designs-keyring
go-github-com-alecthomas-kingpin-v2
go-github-com-aws-aws-sdk-go-v2
go-github-com-aws-aws-sdk-go-v2-config
go-github-com-aws-aws-sdk-go-v2-credentials
go-github-com-aws-aws-sdk-go-v2-service-iam
go-github-com-aws-aws-sdk-go-v2-service-sso
go-github-com-aws-aws-sdk-go-v2-service-ssooidc
go-github-com-aws-aws-sdk-go-v2-service-sts
go-github-com-google-go-cmp
go-github-com-mattn-go-isatty
go-github-com-mattn-go-tty
go-github-com-skratchdot-open-golang
go-golang-org-x-term
go-gopkg-in-ini-v1))
(home-page "https://github.com/99designs/aws-vault")
(synopsis "Vault for securely storing and accessing AWS credentials")
(description
"AWS Vault is a tool to securely store and access @acronym{Amazon Web
Services,AWS} credentials.
AWS Vault stores IAM credentials in your operating system's secure keystore and
then generates temporary credentials from those to expose to your shell and
applications. It's designed to be complementary to the AWS CLI tools, and is
aware of your profiles and configuration in ~/.aws/config.")
(license license:expat)))
(define-public go-github-com-gsterjov-go-libsecret
(package
(name "go-github-com-gsterjov-go-libsecret")

View file

@ -96,6 +96,7 @@
#:use-module (gnu packages golang-build)
#:use-module (gnu packages golang-crypto)
#:use-module (gnu packages golang-xyz)
#:use-module (gnu packages golang-web)
#:use-module (gnu packages gtk)
#:use-module (gnu packages guile)
#:use-module (gnu packages kerberos)
@ -128,6 +129,83 @@
#:use-module (gnu packages xorg)
#:use-module (gnu packages xml))
(define-public aws-vault
(package
(name "aws-vault")
(version "7.2.0")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/99designs/aws-vault")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32 "1dqg6d2k8r80ww70afghf823z0pijha1i0a0c0c6918yb322zkj2"))))
(build-system go-build-system)
(arguments
(list
#:install-source? #f
#:import-path "github.com/99designs/aws-vault"
#:phases
#~(modify-phases %standard-phases
(add-before 'build 'patch-version
(lambda _
(substitute* "src/github.com/99designs/aws-vault/main.go"
(("var Version = \"dev\"")
(string-append "var Version = \"v" #$version "\"")))))
(add-after 'build 'contrib
(lambda* (#:key import-path #:allow-other-keys)
(let* ((zsh-site-dir
(string-append #$output "/share/zsh/site-functions"))
(bash-completion-dir
(string-append #$output "/share/bash-completion/completions"))
(fish-completion-dir
(string-append #$output "/share/fish/completions")))
(for-each mkdir-p (list bash-completion-dir
fish-completion-dir
zsh-site-dir))
(with-directory-excursion
(string-append "src/" import-path "/contrib/completions")
(copy-file "zsh/aws-vault.zsh"
(string-append zsh-site-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"))))))
;; aws-vault: error: add: mkdir /homeless-shelter: permission
;; denied.
(add-before 'check 'set-home
(lambda _
(setenv "HOME" "/tmp"))))))
(native-inputs
(list go-github-com-99designs-keyring
go-github-com-alecthomas-kingpin-v2
go-github-com-aws-aws-sdk-go-v2
go-github-com-aws-aws-sdk-go-v2-config
go-github-com-aws-aws-sdk-go-v2-credentials
go-github-com-aws-aws-sdk-go-v2-service-iam
go-github-com-aws-aws-sdk-go-v2-service-sso
go-github-com-aws-aws-sdk-go-v2-service-ssooidc
go-github-com-aws-aws-sdk-go-v2-service-sts
go-github-com-google-go-cmp
go-github-com-mattn-go-isatty
go-github-com-mattn-go-tty
go-github-com-skratchdot-open-golang
go-golang-org-x-term
go-gopkg-in-ini-v1))
(home-page "https://github.com/99designs/aws-vault")
(synopsis "Vault for securely storing and accessing AWS credentials")
(description
"AWS Vault is a tool to securely store and access @acronym{Amazon Web
Services,AWS} credentials.
AWS Vault stores IAM credentials in your operating system's secure keystore and
then generates temporary credentials from those to expose to your shell and
applications. It's designed to be complementary to the AWS CLI tools, and is
aware of your profiles and configuration in ~/.aws/config.")
(license license:expat)))
(define-public pwgen
(package
(name "pwgen")