forked from mirrors/nixpkgs
4a51f49781
Fixes CVE-2021-32923.
38 lines
1.1 KiB
Nix
38 lines
1.1 KiB
Nix
{ lib, fetchFromGitHub, buildGoPackage, installShellFiles, nixosTests }:
|
|
|
|
buildGoPackage rec {
|
|
pname = "vault";
|
|
version = "1.7.2";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "hashicorp";
|
|
repo = "vault";
|
|
rev = "v${version}";
|
|
sha256 = "0nd77lfccl71qn98cq1yz85aiafplxbr58nafbbflijs1fz1771q";
|
|
};
|
|
|
|
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
|
|
'';
|
|
|
|
passthru.tests.vault = nixosTests.vault;
|
|
|
|
meta = with lib; {
|
|
homepage = "https://www.vaultproject.io/";
|
|
description = "A tool for managing secrets";
|
|
changelog = "https://github.com/hashicorp/vault/blob/v${version}/CHANGELOG.md";
|
|
platforms = platforms.linux ++ platforms.darwin;
|
|
license = licenses.mpl20;
|
|
maintainers = with maintainers; [ rushmorem lnl7 offline pradeepchhetri Chili-Man ];
|
|
};
|
|
}
|