2025-08-14 20:40:01 +00:00

51 lines
1.1 KiB
Nix

{
lib,
buildGoModule,
fetchFromGitHub,
installShellFiles,
}:
buildGoModule rec {
pname = "spicedb";
version = "1.45.2";
src = fetchFromGitHub {
owner = "authzed";
repo = "spicedb";
rev = "v${version}";
hash = "sha256-LDAZdcUfrCWtld6V4GDpAbK+BeT/aeVOQ7G++sMoXU4=";
};
vendorHash = "sha256-hr+xIfPjlrH9igRsYeqNOPgx/jWhDfu73gA+/NoWWxI=";
ldflags = [
"-X 'github.com/jzelinskie/cobrautil/v2.Version=${src.rev}'"
];
subPackages = [ "cmd/spicedb" ];
nativeBuildInputs = [ installShellFiles ];
postInstall = ''
installShellCompletion --cmd spicedb \
--bash <($out/bin/spicedb completion bash) \
--fish <($out/bin/spicedb completion fish) \
--zsh <($out/bin/spicedb completion zsh)
'';
meta = with lib; {
description = "Open source permission database";
longDescription = ''
SpiceDB is an open-source permissions database inspired by
Google Zanzibar.
'';
homepage = "https://authzed.com/";
license = licenses.asl20;
maintainers = with maintainers; [
squat
thoughtpolice
];
mainProgram = "spicedb";
};
}