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

38 lines
1.0 KiB
Nix
Raw Normal View History

{ lib, fetchFromGitHub, buildGoPackage, installShellFiles, nixosTests }:
2016-06-04 22:13:30 +01:00
2019-09-21 10:32:00 +01:00
buildGoPackage rec {
pname = "vault";
version = "1.6.2";
2016-06-04 22:13:30 +01:00
src = fetchFromGitHub {
owner = "hashicorp";
repo = "vault";
2016-09-23 18:34:51 +01:00
rev = "v${version}";
sha256 = "1g6fz6dl90cb5pnvvmkndqgncfjy50j9jw3xzn8s91yzvvld8ds7";
2016-09-23 18:34:51 +01:00
};
2019-09-21 10:32:00 +01:00
goPackagePath = "github.com/hashicorp/vault";
subPackages = [ "." ];
2020-04-26 04:16:57 +01:00
nativeBuildInputs = [ installShellFiles ];
2020-07-29 10:20:00 +01:00
buildFlagsArray = [ "-tags=vault" "-ldflags=-s -w -X ${goPackagePath}/sdk/version.GitCommit=${src.rev}" ];
postInstall = ''
echo "complete -C $out/bin/vault vault" > vault.bash
2020-04-26 04:16:57 +01:00
installShellCompletion vault.bash
2016-12-11 13:59:14 +00:00
'';
2020-11-02 04:20:00 +00:00
passthru.tests.vault = nixosTests.vault;
meta = with lib; {
2020-03-06 09:20:00 +00:00
homepage = "https://www.vaultproject.io/";
2016-09-23 18:34:51 +01:00
description = "A tool for managing secrets";
2020-11-21 04:20:00 +00:00
changelog = "https://github.com/hashicorp/vault/blob/v${version}/CHANGELOG.md";
2017-02-16 19:47:30 +00:00
platforms = platforms.linux ++ platforms.darwin;
2016-09-23 18:34:51 +01:00
license = licenses.mpl20;
2018-08-11 13:47:54 +01:00
maintainers = with maintainers; [ rushmorem lnl7 offline pradeepchhetri ];
2016-06-04 22:13:30 +01:00
};
}