1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-25 23:20:55 +00:00
nixpkgs/pkgs/tools/security/vault/default.nix
2020-07-07 20:26:13 +00:00

38 lines
966 B
Nix

{ stdenv, fetchFromGitHub, buildGoPackage, installShellFiles }:
buildGoPackage rec {
pname = "vault";
version = "1.4.3";
src = fetchFromGitHub {
owner = "hashicorp";
repo = "vault";
rev = "v${version}";
sha256 = "145zvkh3n503l7zkqkw8laqmqcwd0igd42s4xj0nw78xj2ppj9b8";
};
goPackagePath = "github.com/hashicorp/vault";
subPackages = [ "." ];
nativeBuildInputs = [ installShellFiles ];
buildFlagsArray = [
"-tags='vault'"
"-ldflags=\"-X github.com/hashicorp/vault/sdk/version.GitCommit='v${version}'\""
];
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 ];
};
}