2021-07-28 18:57:42 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, buildGoModule, installShellFiles, nixosTests
|
2021-06-28 21:22:31 +00:00
|
|
|
, makeWrapper
|
|
|
|
, gawk
|
|
|
|
, glibc
|
|
|
|
}:
|
2016-06-04 21:13:30 +00:00
|
|
|
|
2021-07-28 18:57:42 +00:00
|
|
|
buildGoModule rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "vault";
|
2023-04-10 00:05:18 +00:00
|
|
|
version = "1.13.1";
|
2016-06-04 21:13:30 +00:00
|
|
|
|
2016-06-06 10:56:28 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "hashicorp";
|
|
|
|
repo = "vault";
|
2016-09-23 17:34:51 +00:00
|
|
|
rev = "v${version}";
|
2023-04-10 00:05:18 +00:00
|
|
|
sha256 = "sha256-bYZghlQi2p3XnKWH3H2sehds/XSMW8pbzBophNMa5q4=";
|
2016-09-23 17:34:51 +00:00
|
|
|
};
|
|
|
|
|
2023-04-10 00:05:18 +00:00
|
|
|
vendorHash = "sha256-mNnStWxrSR455zGWkj4dLDFk/kdOXYgk8LKB0wy7K5M=";
|
2019-09-21 09:32:00 +00:00
|
|
|
|
|
|
|
subPackages = [ "." ];
|
2017-06-29 02:02:13 +00:00
|
|
|
|
2021-06-28 21:22:31 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles makeWrapper ];
|
2020-04-26 03:16:57 +00:00
|
|
|
|
2021-08-06 00:58:02 +00:00
|
|
|
tags = [ "vault" ];
|
2021-07-28 18:57:52 +00:00
|
|
|
|
|
|
|
ldflags = [
|
|
|
|
"-s" "-w"
|
|
|
|
"-X github.com/hashicorp/vault/sdk/version.GitCommit=${src.rev}"
|
|
|
|
"-X github.com/hashicorp/vault/sdk/version.Version=${version}"
|
|
|
|
"-X github.com/hashicorp/vault/sdk/version.VersionPrerelease="
|
|
|
|
];
|
2017-07-02 00:39:55 +00:00
|
|
|
|
2019-08-28 07:47:03 +00:00
|
|
|
postInstall = ''
|
2020-04-28 01:50:57 +00:00
|
|
|
echo "complete -C $out/bin/vault vault" > vault.bash
|
2020-04-26 03:16:57 +00:00
|
|
|
installShellCompletion vault.bash
|
2021-07-06 14:58:17 +00:00
|
|
|
'' + lib.optionalString stdenv.isLinux ''
|
2021-06-28 21:22:31 +00:00
|
|
|
wrapProgram $out/bin/vault \
|
|
|
|
--prefix PATH ${lib.makeBinPath [ gawk glibc ]}
|
2016-12-11 13:59:14 +00:00
|
|
|
'';
|
|
|
|
|
2022-07-05 08:54:11 +00:00
|
|
|
passthru.tests = { inherit (nixosTests) vault vault-postgresql vault-dev; };
|
2020-11-02 04:20:00 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-03-06 09:20:00 +00:00
|
|
|
homepage = "https://www.vaultproject.io/";
|
2016-09-23 17:34:51 +00: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";
|
2016-09-23 17:34:51 +00:00
|
|
|
license = licenses.mpl20;
|
2022-03-23 16:15:17 +00:00
|
|
|
maintainers = with maintainers; [ rushmorem lnl7 offline pradeepchhetri Chili-Man techknowlogick ];
|
2016-06-04 21:13:30 +00:00
|
|
|
};
|
|
|
|
}
|