File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change 22 lib,
33 buildGoModule,
44 fetchFromGitHub,
5+ installShellFiles,
6+ stdenv,
57}:
68
79buildGoModule rec {
@@ -22,13 +24,25 @@ buildGoModule rec {
2224 "-X github.com/sunny0826/kubecm/version.Version=${version}"
2325 ];
2426
27+ nativeBuildInputs = [ installShellFiles ];
28+
29+ postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
30+ installShellCompletion --cmd kubecm \
31+ --bash <($out/bin/kubecm completion bash) \
32+ --fish <($out/bin/kubecm completion fish) \
33+ --zsh <($out/bin/kubecm completion zsh)
34+ '';
35+
2536 doCheck = false;
2637
2738 meta = with lib; {
2839 description = "Manage your kubeconfig more easily";
2940 homepage = "https://github.com/sunny0826/kubecm/";
3041 license = licenses.asl20;
31- maintainers = with maintainers; [ qjoly ];
42+ maintainers = with maintainers; [
43+ qjoly
44+ sailord
45+ ];
3246 mainProgram = "kubecm";
3347 };
3448}
You can’t perform that action at this time.
0 commit comments