mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-10-31 22:51:22 +00:00
Merge pull request #54335 from zimbatm/kubectl-small
kubectl: reduce closure size
This commit is contained in:
commit
555e7eb375
33
pkgs/applications/networking/cluster/kubectl/default.nix
Normal file
33
pkgs/applications/networking/cluster/kubectl/default.nix
Normal file
@ -0,0 +1,33 @@
|
||||
{ stdenv, lib, 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" ];
|
||||
|
||||
doBuild = false;
|
||||
|
||||
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";
|
||||
};
|
||||
}
|
@ -17930,11 +17930,9 @@ in
|
||||
|
||||
kubeval = callPackage ../applications/networking/cluster/kubeval { };
|
||||
|
||||
kubernetes = callPackage ../applications/networking/cluster/kubernetes { };
|
||||
kubernetes = callPackage ../applications/networking/cluster/kubernetes { };
|
||||
|
||||
kubectl = (kubernetes.override { components = [ "cmd/kubectl" ]; }).overrideAttrs(oldAttrs: {
|
||||
name = "kubectl-${oldAttrs.version}";
|
||||
});
|
||||
kubectl = callPackage ../applications/networking/cluster/kubectl { };
|
||||
|
||||
kubernetes-helm = callPackage ../applications/networking/cluster/helm { };
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user