scc: install shell completions

This commit is contained in:
Biswapriyo Nath
2026-06-25 16:37:44 +00:00
parent d406556640
commit 911bfcc211
+11
View File
@@ -2,6 +2,8 @@
lib,
buildGoModule,
fetchFromGitHub,
installShellFiles,
stdenv,
}:
buildGoModule (finalAttrs: {
pname = "scc";
@@ -16,6 +18,15 @@ buildGoModule (finalAttrs: {
vendorHash = null;
nativeBuildInputs = [ installShellFiles ];
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd scc \
--bash <($out/bin/scc completion bash) \
--fish <($out/bin/scc completion fish) \
--zsh <($out/bin/scc completion zsh)
'';
# scc has a scripts/ sub-package that's for testing.
excludedPackages = [ "scripts" ];