spicedb: add shell completion (#404670)

This commit is contained in:
Peder Bergebakken Sundt
2025-05-28 15:31:52 +02:00
committed by GitHub
2 changed files with 20 additions and 0 deletions
+10
View File
@@ -2,6 +2,7 @@
lib,
buildGoModule,
fetchFromGitHub,
installShellFiles,
}:
buildGoModule rec {
@@ -23,6 +24,15 @@ buildGoModule rec {
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 = ''
+10
View File
@@ -2,6 +2,7 @@
lib,
buildGoModule,
fetchFromGitHub,
installShellFiles,
}:
buildGoModule rec {
@@ -23,6 +24,15 @@ buildGoModule rec {
export NO_COLOR=true
'';
nativeBuildInputs = [ installShellFiles ];
postInstall = ''
installShellCompletion --cmd zed \
--bash <($out/bin/zed completion bash) \
--fish <($out/bin/zed completion fish) \
--zsh <($out/bin/zed completion zsh)
'';
meta = with lib; {
description = "Command line for managing SpiceDB";
mainProgram = "zed";