2020-04-25 20:16:57 -07:00
|
|
|
{ stdenv, fetchFromGitHub, buildGoPackage, installShellFiles }:
|
2016-06-04 14:13:30 -07:00
|
|
|
|
2019-09-21 02:32:00 -07:00
|
|
|
buildGoPackage rec {
|
2019-08-15 05:41:18 -07:00
|
|
|
pname = "vault";
|
2020-04-07 02:20:00 -07:00
|
|
|
version = "1.4.0";
|
2016-06-04 14:13:30 -07:00
|
|
|
|
2016-06-06 03:56:28 -07:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "hashicorp";
|
|
|
|
repo = "vault";
|
2016-09-23 10:34:51 -07:00
|
|
|
rev = "v${version}";
|
2020-04-07 02:20:00 -07:00
|
|
|
sha256 = "13ycg9shara4ycbi79wj28z6nimnsqgisbf35ca3q9w066ac0ja2";
|
2016-09-23 10:34:51 -07:00
|
|
|
};
|
|
|
|
|
2019-09-21 02:32:00 -07:00
|
|
|
goPackagePath = "github.com/hashicorp/vault";
|
|
|
|
|
|
|
|
subPackages = [ "." ];
|
2017-06-28 19:02:13 -07:00
|
|
|
|
2020-04-25 20:16:57 -07:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
2019-08-28 00:47:03 -07:00
|
|
|
buildFlagsArray = [
|
|
|
|
"-tags='vault'"
|
|
|
|
"-ldflags=\"-X github.com/hashicorp/vault/sdk/version.GitCommit='v${version}'\""
|
|
|
|
];
|
2017-07-01 17:39:55 -07:00
|
|
|
|
2019-08-28 00:47:03 -07:00
|
|
|
postInstall = ''
|
2020-04-25 20:16:57 -07:00
|
|
|
echo "complete -C $bin/bin/vault vault" > vault.bash
|
|
|
|
installShellCompletion vault.bash
|
2016-12-11 05:59:14 -08:00
|
|
|
'';
|
|
|
|
|
2016-09-23 10:34:51 -07:00
|
|
|
meta = with stdenv.lib; {
|
2020-03-06 01:20:00 -08:00
|
|
|
homepage = "https://www.vaultproject.io/";
|
2016-09-23 10:34:51 -07:00
|
|
|
description = "A tool for managing secrets";
|
2017-02-16 11:47:30 -08:00
|
|
|
platforms = platforms.linux ++ platforms.darwin;
|
2016-09-23 10:34:51 -07:00
|
|
|
license = licenses.mpl20;
|
2018-08-11 05:47:54 -07:00
|
|
|
maintainers = with maintainers; [ rushmorem lnl7 offline pradeepchhetri ];
|
2016-06-04 14:13:30 -07:00
|
|
|
};
|
|
|
|
}
|