2021-05-03 20:48:10 +00:00
|
|
|
{ buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, installShellFiles
|
|
|
|
, lib
|
|
|
|
, makeWrapper
|
|
|
|
, xdg-utils
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
buildGoModule rec {
|
|
|
|
pname = "aws-vault";
|
2022-01-25 03:21:06 +00:00
|
|
|
version = "6.4.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "99designs";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-01-25 03:21:06 +00:00
|
|
|
sha256 = "sha256-5cBQFkagDfMb8xvEQgWlVbYp++mXIHl2p5TZuiaO4Rw=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
vendorSha256 = "sha256-THqVvu5eJs1ZTUQ3JxGIt7IsoMhSkeMNicBGbkPz63A=";
|
2020-08-20 17:08:02 +00:00
|
|
|
|
2021-05-03 20:48:10 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles makeWrapper ];
|
2021-03-09 03:18:52 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
2021-05-03 20:48:10 +00:00
|
|
|
wrapProgram $out/bin/aws-vault --prefix PATH : ${lib.makeBinPath [ xdg-utils ]}
|
2021-03-09 03:18:52 +00:00
|
|
|
installShellCompletion --cmd aws-vault \
|
|
|
|
--bash $src/contrib/completions/bash/aws-vault.bash \
|
|
|
|
--fish $src/contrib/completions/fish/aws-vault.fish \
|
|
|
|
--zsh $src/contrib/completions/zsh/aws-vault.zsh
|
|
|
|
'';
|
|
|
|
|
|
|
|
|
2020-08-20 17:08:02 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
subPackages = [ "." ];
|
|
|
|
|
|
|
|
# set the version. see: aws-vault's Makefile
|
2021-08-27 14:25:00 +00:00
|
|
|
ldflags = [
|
|
|
|
"-X main.Version=v${version}"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-05-03 20:48:10 +00:00
|
|
|
doInstallCheck = true;
|
|
|
|
|
|
|
|
installCheckPhase = ''
|
|
|
|
$out/bin/aws-vault --version 2>&1 | grep ${version} > /dev/null
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description =
|
|
|
|
"A vault for securely storing and accessing AWS credentials in development environments";
|
|
|
|
homepage = "https://github.com/99designs/aws-vault";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ zimbatm ];
|
|
|
|
};
|
2020-08-20 17:08:02 +00:00
|
|
|
}
|