2021-07-03 03:11:41 +00:00
|
|
|
{ lib, fetchFromGitHub, buildGoPackage, installShellFiles, nixosTests
|
|
|
|
, makeWrapper
|
|
|
|
, gawk
|
|
|
|
, glibc
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildGoPackage rec {
|
|
|
|
pname = "vault";
|
2021-06-28 23:13:55 +00:00
|
|
|
version = "1.7.3";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "hashicorp";
|
|
|
|
repo = "vault";
|
|
|
|
rev = "v${version}";
|
2021-06-28 23:13:55 +00:00
|
|
|
sha256 = "sha256-BO4xzZrX9eVETQWjBDBfP7TlD7sO+gLgbB330A11KAI=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
goPackagePath = "github.com/hashicorp/vault";
|
|
|
|
|
|
|
|
subPackages = [ "." ];
|
|
|
|
|
2021-07-03 03:11:41 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles makeWrapper ];
|
2020-05-03 17:38:23 +00:00
|
|
|
|
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
|
2021-07-03 03:11:41 +00:00
|
|
|
|
|
|
|
wrapProgram $out/bin/vault \
|
|
|
|
--prefix PATH ${lib.makeBinPath [ gawk glibc ]}
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2020-11-03 02:18:15 +00:00
|
|
|
passthru.tests.vault = nixosTests.vault;
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://www.vaultproject.io/";
|
|
|
|
description = "A tool for managing secrets";
|
2020-11-24 20:58:05 +00:00
|
|
|
changelog = "https://github.com/hashicorp/vault/blob/v${version}/CHANGELOG.md";
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.linux ++ platforms.darwin;
|
|
|
|
license = licenses.mpl20;
|
2021-03-09 03:18:52 +00:00
|
|
|
maintainers = with maintainers; [ rushmorem lnl7 offline pradeepchhetri Chili-Man ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|