nixpkgs/pkgs/applications/networking/cluster/kubernetes/kubectl.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

33 lines
805 B
Nix
Raw Normal View History

2022-07-05 01:35:20 +00:00
{ lib, kubernetes }:
2022-07-05 01:35:20 +00:00
kubernetes.overrideAttrs (_: rec {
pname = "kubectl";
outputs = [ "out" "man" "convert" ];
WHAT = lib.concatStringsSep " " [
"cmd/kubectl"
"cmd/kubectl-convert"
2022-06-21 08:38:36 +00:00
];
installPhase = ''
runHook preInstall
install -D _output/local/go/bin/kubectl -t $out/bin
install -D _output/local/go/bin/kubectl-convert -t $convert/bin
installManPage docs/man/man1/kubectl*
2020-12-01 22:46:57 +00:00
installShellCompletion --cmd kubectl \
--bash <($out/bin/kubectl completion bash) \
--fish <($out/bin/kubectl completion fish) \
2020-12-01 22:46:57 +00:00
--zsh <($out/bin/kubectl completion zsh)
runHook postInstall
'';
meta = kubernetes.meta // {
description = "Kubernetes CLI";
homepage = "https://github.com/kubernetes/kubectl";
platforms = lib.platforms.unix;
};
2022-07-05 01:35:20 +00:00
})