3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/networking/cluster/kubectl/default.nix
Milan Pässler (work) 185fd61631 treewide: remove uses of doBuild and doConfigure
doBuild and doConfigure are not actually used by any builders, they were
probably added by mistake and just confuse people.
2019-09-02 23:42:12 +02:00

32 lines
830 B
Nix

{ stdenv, kubernetes }:
stdenv.mkDerivation {
name = "kubectl-${kubernetes.version}";
# kubectl is currently part of the main distribution but will eventially be
# split out (see homepage)
src = kubernetes;
outputs = [ "out" "man" ];
installPhase = ''
mkdir -p \
"$out/bin" \
"$out/share/bash-completion/completions" \
"$out/share/zsh/site-functions" \
"$man/share/man/man1"
cp bin/kubectl $out/bin/kubectl
cp "${kubernetes.man}/share/man/man1"/kubectl* "$man/share/man/man1"
$out/bin/kubectl completion bash > $out/share/bash-completion/completions/kubectl
$out/bin/kubectl completion zsh > $out/share/zsh/site-functions/_kubectl
'';
meta = kubernetes.meta // {
description = "Kubernetes CLI";
homepage = "https://github.com/kubernetes/kubectl";
};
}