c594a97518
GitOrigin-RevId: 301aada7a64812853f2e2634a530ef5d34505048
51 lines
1.5 KiB
Nix
51 lines
1.5 KiB
Nix
{ stdenv, lib, fetchFromGitHub, buildGoModule, installShellFiles, nixosTests
|
|
, makeWrapper
|
|
, gawk
|
|
, glibc
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "vault";
|
|
version = "1.12.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "hashicorp";
|
|
repo = "vault";
|
|
rev = "v${version}";
|
|
sha256 = "sha256-c2MIX4uDbHuiuZr12SkUV6jLsx2PS3Q+NngacT7AQO0=";
|
|
};
|
|
|
|
vendorSha256 = "sha256-BPIUIy1xEUzbh1ESldiOhDpYp4EdfUi/QkBNqk3U1UY=";
|
|
|
|
subPackages = [ "." ];
|
|
|
|
nativeBuildInputs = [ installShellFiles makeWrapper ];
|
|
|
|
tags = [ "vault" ];
|
|
|
|
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="
|
|
];
|
|
|
|
postInstall = ''
|
|
echo "complete -C $out/bin/vault vault" > vault.bash
|
|
installShellCompletion vault.bash
|
|
'' + lib.optionalString stdenv.isLinux ''
|
|
wrapProgram $out/bin/vault \
|
|
--prefix PATH ${lib.makeBinPath [ gawk glibc ]}
|
|
'';
|
|
|
|
passthru.tests = { inherit (nixosTests) vault vault-postgresql vault-dev; };
|
|
|
|
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 techknowlogick ];
|
|
};
|
|
}
|