kubecm: installShellCompletion (#398508)
This commit is contained in:
commit
ec9ef36645
@ -2,6 +2,8 @@
|
||||
lib,
|
||||
buildGoModule,
|
||||
fetchFromGitHub,
|
||||
installShellFiles,
|
||||
stdenv,
|
||||
}:
|
||||
|
||||
buildGoModule rec {
|
||||
@ -22,13 +24,25 @@ buildGoModule rec {
|
||||
"-X github.com/sunny0826/kubecm/version.Version=${version}"
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
installShellCompletion --cmd kubecm \
|
||||
--bash <($out/bin/kubecm completion bash) \
|
||||
--fish <($out/bin/kubecm completion fish) \
|
||||
--zsh <($out/bin/kubecm completion zsh)
|
||||
'';
|
||||
|
||||
doCheck = false;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Manage your kubeconfig more easily";
|
||||
homepage = "https://github.com/sunny0826/kubecm/";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ qjoly ];
|
||||
maintainers = with maintainers; [
|
||||
qjoly
|
||||
sailord
|
||||
];
|
||||
mainProgram = "kubecm";
|
||||
};
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user