2017-06-28 03:15:20 +02:00
|
|
|
{ stdenv, buildGoPackage, fetchFromGitHub }:
|
2016-06-04 23:13:30 +02:00
|
|
|
|
2016-12-11 14:59:14 +01:00
|
|
|
let
|
|
|
|
vaultBashCompletions = fetchFromGitHub {
|
|
|
|
owner = "iljaweis";
|
|
|
|
repo = "vault-bash-completion";
|
2017-01-28 21:08:50 +01:00
|
|
|
rev = "e2f59b64be1fa5430fa05c91b6274284de4ea77c";
|
|
|
|
sha256 = "10m75rp3hy71wlmnd88grmpjhqy0pwb9m8wm19l0f463xla54frd";
|
2016-12-11 14:59:14 +01:00
|
|
|
};
|
|
|
|
in buildGoPackage rec {
|
2016-06-04 23:13:30 +02:00
|
|
|
name = "vault-${version}";
|
2017-06-27 16:54:25 +02:00
|
|
|
version = "0.7.3";
|
2016-06-04 23:13:30 +02:00
|
|
|
|
|
|
|
goPackagePath = "github.com/hashicorp/vault";
|
|
|
|
|
2016-06-06 12:56:28 +02:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "hashicorp";
|
|
|
|
repo = "vault";
|
2016-09-23 19:34:51 +02:00
|
|
|
rev = "v${version}";
|
2017-06-27 16:54:25 +02:00
|
|
|
sha256 = "15wj1pfgzwzjfrqy7b5bx4y9f0hbpqlfif58l5xamwm88229qk4m";
|
2016-09-23 19:34:51 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
buildFlagsArray = ''
|
|
|
|
-ldflags=
|
|
|
|
-X github.com/hashicorp/vault/version.GitCommit=${version}
|
|
|
|
'';
|
|
|
|
|
2016-12-11 14:59:14 +01:00
|
|
|
postInstall = ''
|
2017-01-28 21:08:50 +01:00
|
|
|
mkdir -p $bin/share/bash-completion/completions/
|
2016-12-11 14:59:14 +01:00
|
|
|
cp ${vaultBashCompletions}/vault-bash-completion.sh $bin/share/bash-completion/completions/vault
|
|
|
|
'';
|
|
|
|
|
2016-09-23 19:34:51 +02:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = https://www.vaultproject.io;
|
|
|
|
description = "A tool for managing secrets";
|
2017-02-16 20:47:30 +01:00
|
|
|
platforms = platforms.linux ++ platforms.darwin;
|
2016-09-23 19:34:51 +02:00
|
|
|
license = licenses.mpl20;
|
2017-01-28 21:08:50 +01:00
|
|
|
maintainers = with maintainers; [ rushmorem offline pradeepchhetri ];
|
2016-06-04 23:13:30 +02:00
|
|
|
};
|
|
|
|
}
|