2020-11-03 02:18:15 +00:00
|
|
|
{ stdenv, fetchFromGitHub, buildGoPackage, installShellFiles, nixosTests }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildGoPackage rec {
|
|
|
|
pname = "vault";
|
2020-11-03 02:18:15 +00:00
|
|
|
version = "1.5.5";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "hashicorp";
|
|
|
|
repo = "vault";
|
|
|
|
rev = "v${version}";
|
2020-11-03 02:18:15 +00:00
|
|
|
sha256 = "144v7vmp2amv29y6d50jzc21zrcw0g6qlwks16mvqy2hnbsnzdwa";
|
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-08-20 17:08:02 +00:00
|
|
|
buildFlagsArray = [ "-tags=vault" "-ldflags=-s -w -X ${goPackagePath}/sdk/version.GitCommit=${src.rev}" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
2020-05-15 21:57:56 +00:00
|
|
|
echo "complete -C $out/bin/vault vault" > vault.bash
|
2020-05-03 17:38:23 +00:00
|
|
|
installShellCompletion vault.bash
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2020-11-03 02:18:15 +00:00
|
|
|
passthru.tests.vault = nixosTests.vault;
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|