svu: add shell completions (#478490)

This commit is contained in:
Aleksana
2026-01-10 12:11:42 +00:00
committed by GitHub
+10
View File
@@ -4,6 +4,8 @@
fetchFromGitHub,
testers,
svu,
installShellFiles,
stdenv,
}:
buildGoModule rec {
@@ -31,6 +33,14 @@ buildGoModule rec {
rm internal/git/git_test.go
'';
nativeBuildInputs = [ installShellFiles ];
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd svu \
--bash <($out/bin/svu completion bash) \
--fish <($out/bin/svu completion fish) \
--zsh <($out/bin/svu completion zsh)
'';
passthru.tests.version = testers.testVersion { package = svu; };
meta = {