nixpkgs/pkgs/tools/security/vault/default.nix

40 lines
1.1 KiB
Nix
Raw Normal View History

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