mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-16 09:53:17 +00:00
d960346ac4
Fixes CVE-2021-3024, CVE-2021-3282 and CVE-2020-25594.
38 lines
1 KiB
Nix
38 lines
1 KiB
Nix
{ lib, fetchFromGitHub, buildGoPackage, installShellFiles, nixosTests }:
|
|
|
|
buildGoPackage rec {
|
|
pname = "vault";
|
|
version = "1.6.2";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "hashicorp";
|
|
repo = "vault";
|
|
rev = "v${version}";
|
|
sha256 = "1g6fz6dl90cb5pnvvmkndqgncfjy50j9jw3xzn8s91yzvvld8ds7";
|
|
};
|
|
|
|
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 ];
|
|
};
|
|
}
|