2020-05-03 17:38:23 +00:00
|
|
|
{ stdenv, fetchFromGitHub, buildGoPackage, installShellFiles }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildGoPackage rec {
|
|
|
|
pname = "vault";
|
2020-05-03 17:38:23 +00:00
|
|
|
version = "1.4.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "hashicorp";
|
|
|
|
repo = "vault";
|
|
|
|
rev = "v${version}";
|
2020-05-03 17:38:23 +00:00
|
|
|
sha256 = "0fbbvihvlzh95rrk65bwxfcam6y57q0yffq8dzvcbm3i0ap7ndar";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
goPackagePath = "github.com/hashicorp/vault";
|
|
|
|
|
|
|
|
subPackages = [ "." ];
|
|
|
|
|
2020-05-03 17:38:23 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
buildFlagsArray = [
|
|
|
|
"-tags='vault'"
|
|
|
|
"-ldflags=\"-X github.com/hashicorp/vault/sdk/version.GitCommit='v${version}'\""
|
|
|
|
];
|
|
|
|
|
|
|
|
postInstall = ''
|
2020-05-03 17:38:23 +00:00
|
|
|
echo "complete -C $bin/bin/vault vault" > vault.bash
|
|
|
|
installShellCompletion vault.bash
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = "https://www.vaultproject.io/";
|
|
|
|
description = "A tool for managing secrets";
|
|
|
|
platforms = platforms.linux ++ platforms.darwin;
|
|
|
|
license = licenses.mpl20;
|
|
|
|
maintainers = with maintainers; [ rushmorem lnl7 offline pradeepchhetri ];
|
|
|
|
};
|
|
|
|
}
|