kubecm: installShellCompletion (#398508)

authored by Peder Bergebakken Sundt and committed by GitHub ec9ef366 db22a690

+15 -1
+15 -1
pkgs/by-name/ku/kubecm/package.nix
··· 2 lib, 3 buildGoModule, 4 fetchFromGitHub, 5 }: 6 7 buildGoModule rec { ··· 22 "-X github.com/sunny0826/kubecm/version.Version=${version}" 23 ]; 24 25 doCheck = false; 26 27 meta = with lib; { 28 description = "Manage your kubeconfig more easily"; 29 homepage = "https://github.com/sunny0826/kubecm/"; 30 license = licenses.asl20; 31 - maintainers = with maintainers; [ qjoly ]; 32 mainProgram = "kubecm"; 33 }; 34 }
··· 2 lib, 3 buildGoModule, 4 fetchFromGitHub, 5 + installShellFiles, 6 + stdenv, 7 }: 8 9 buildGoModule rec { ··· 24 "-X github.com/sunny0826/kubecm/version.Version=${version}" 25 ]; 26 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 + 36 doCheck = false; 37 38 meta = with lib; { 39 description = "Manage your kubeconfig more easily"; 40 homepage = "https://github.com/sunny0826/kubecm/"; 41 license = licenses.asl20; 42 + maintainers = with maintainers; [ 43 + qjoly 44 + sailord 45 + ]; 46 mainProgram = "kubecm"; 47 }; 48 }