blob: 999eb5144042cc2c763898fad64fe1a9d54ff114 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
{
lib,
stdenv,
buildGoModule,
fetchFromGitHub,
installShellFiles,
}:
buildGoModule (finalAttrs: {
pname = "spicedb";
version = "1.56.1";
src = fetchFromGitHub {
owner = "authzed";
repo = "spicedb";
tag = "v${finalAttrs.version}";
hash = "sha256-ak8AbbVMKzIWRJHezzpxF8vn2L0gu8069ghqf+/xYA4=";
};
vendorHash = "sha256-HOtYcs7F4Pf0yFyfuJOpROoFTTN630t+5lKoBLoJedM=";
ldflags = [
"-X 'github.com/jzelinskie/cobrautil/v2.Version=${finalAttrs.src.tag}'"
];
subPackages = [ "cmd/spicedb" ];
nativeBuildInputs = [ installShellFiles ];
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd spicedb \
--bash <($out/bin/spicedb completion bash) \
--fish <($out/bin/spicedb completion fish) \
--zsh <($out/bin/spicedb completion zsh)
'';
meta = {
changelog = "https://github.com/authzed/spicedb/releases/tag/${finalAttrs.src.tag}";
description = "Open source permission database";
longDescription = ''
SpiceDB is an open-source permissions database inspired by
Google Zanzibar.
'';
homepage = "https://authzed.com/";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [
squat
thoughtpolice
];
mainProgram = "spicedb";
};
})
|