Files
nixpkgs/pkgs/by-name/va/vault/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

89 lines
1.8 KiB
Nix

{
stdenv,
lib,
fetchFromGitHub,
buildGoModule,
installShellFiles,
nixosTests,
makeWrapper,
gawk,
glibc,
}:
buildGoModule rec {
pname = "vault";
version = "1.20.4";
src = fetchFromGitHub {
owner = "hashicorp";
repo = "vault";
rev = "v${version}";
hash = "sha256-GZ+/NzOjcKTYOq4HajKGD68RNxIdXxfLo/pAewaZ8F8=";
};
vendorHash = "sha256-mhT5s1nIdX/57TDEaWwbni0E7DX0W0WwwvrSr7L66hI=";
proxyVendor = true;
postPatch = ''
# Remove defunct github.com/hashicorp/go-cmp dependency
sed -i '/github\.com\/hashicorp\/go-cmp/d' go.mod
sed -i '/github\.com\/hashicorp\/go-cmp/d' go.sum
'';
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.hostPlatform.isLinux ''
wrapProgram $out/bin/vault \
--prefix PATH ${
lib.makeBinPath [
gawk
glibc
]
}
'';
passthru.tests = {
inherit (nixosTests)
vault
vault-postgresql
vault-dev
vault-agent
;
};
meta = {
homepage = "https://www.vaultproject.io/";
description = "Tool for managing secrets";
changelog = "https://github.com/hashicorp/vault/blob/v${version}/CHANGELOG.md";
license = lib.licenses.bsl11;
mainProgram = "vault";
maintainers = with lib.maintainers; [
rushmorem
lnl7
offline
Chili-Man
techknowlogick
];
};
}