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.

38 lines
750 B
Nix
Raw Normal View History

{ lib, stdenv, kubernetes }:
stdenv.mkDerivation rec {
pname = "kubectl";
inherit (kubernetes)
disallowedReferences
GOFLAGS
nativeBuildInputs
postBuild
postPatch
src
version
;
outputs = [ "out" "man" ];
WHAT = "cmd/kubectl";
installPhase = ''
runHook preInstall
install -D _output/local/go/bin/kubectl -t $out/bin
installManPage docs/man/man1/kubectl*
2020-12-01 22:46:57 +00:00
installShellCompletion --cmd kubectl \
--bash <($out/bin/kubectl completion bash) \
--zsh <($out/bin/kubectl completion zsh)
runHook postInstall
'';
meta = kubernetes.meta // {
description = "Kubernetes CLI";
homepage = "https://github.com/kubernetes/kubectl";
platforms = lib.platforms.unix;
};
}