depot/third_party/nixpkgs/pkgs/tools/security/vault/default.nix
Default email 0eaa97ffad Project import generated by Copybara.
GitOrigin-RevId: c59ea8b8a0e7f927e7291c14ea6cd1bd3a16ff38
2020-08-20 19:08:02 +02:00

34 lines
943 B
Nix

{ stdenv, fetchFromGitHub, buildGoPackage, installShellFiles }:
buildGoPackage rec {
pname = "vault";
version = "1.5.0";
src = fetchFromGitHub {
owner = "hashicorp";
repo = "vault";
rev = "v${version}";
sha256 = "1bdhcsx7hwz4kb68jrrrzlbr7k744g0pym996dq1p5rvz05j3pqc";
};
goPackagePath = "github.com/hashicorp/vault";
subPackages = [ "." ];
nativeBuildInputs = [ installShellFiles ];
buildFlagsArray = [ "-tags=vault" "-ldflags=-s -w -X ${goPackagePath}/sdk/version.GitCommit=${src.rev}" ];
postInstall = ''
echo "complete -C $out/bin/vault vault" > vault.bash
installShellCompletion vault.bash
'';
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 ];
};
}