You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
52 lines
1.4 KiB
Nix
52 lines
1.4 KiB
Nix
{ stdenv, lib, fetchFromGitHub, buildGoModule, installShellFiles, nixosTests
|
|
, makeWrapper
|
|
, gawk
|
|
, glibc
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "openbao";
|
|
version = "2.0.2";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "openbao";
|
|
repo = "openbao";
|
|
rev = "v${version}";
|
|
hash = "sha256-7Dqrw00wjI/VCahY1+ANBMq9nPUQlb94HiBB3CKyhSQ=";
|
|
};
|
|
|
|
vendorHash = "sha256-qojDPhdCqnYCAFo5sc9mWyQxvHc/p/a1LYdW7MbOO5w=";
|
|
|
|
subPackages = [ "." ];
|
|
|
|
nativeBuildInputs = [ installShellFiles makeWrapper ];
|
|
|
|
tags = [ "openbao" ];
|
|
|
|
ldflags = [
|
|
"-s" "-w"
|
|
"-X github.com/openbao/openbao/sdk/version.GitCommit=${src.rev}"
|
|
"-X github.com/openbao/openbao/sdk/version.Version=${version}"
|
|
"-X github.com/openbao/openbao/sdk/version.VersionPrerelease="
|
|
];
|
|
|
|
postInstall = ''
|
|
echo "complete -C $out/bin/openbao openbao" > openbao.bash
|
|
installShellCompletion openbao.bash
|
|
'' + lib.optionalString stdenv.isLinux ''
|
|
wrapProgram $out/bin/openbao \
|
|
--prefix PATH ${lib.makeBinPath [ gawk glibc ]}
|
|
'';
|
|
|
|
# passthru.tests = { inherit (nixosTests) vault vault-postgresql vault-dev vault-agent; };
|
|
|
|
meta = with lib; {
|
|
homepage = "https://openbao.org/";
|
|
description = "Tool for managing secrets";
|
|
changelog = "https://github.com/openbao/openbao/blob/v${version}/CHANGELOG.md";
|
|
license = licenses.mpl20;
|
|
mainProgram = "openbao";
|
|
maintainers = with maintainers; [ raitobezarius ];
|
|
};
|
|
}
|