mirror of
https://github.com/TECHNOFAB11/kubenix.git
synced 2025-12-12 16:10:05 +01:00
inaugurate decent devshell
This commit is contained in:
parent
be58b0e94e
commit
2026496ea0
7 changed files with 313 additions and 4 deletions
30
pkgs/applications/networking/cluster/kubectl/default.nix
Normal file
30
pkgs/applications/networking/cluster/kubectl/default.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{ stdenv, kubernetes, installShellFiles }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "kubectl-${kubernetes.version}";
|
||||
|
||||
# kubectl is currently part of the main distribution but will eventially be
|
||||
# split out (see homepage)
|
||||
dontUnpack = true;
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
|
||||
outputs = [ "out" "man" ];
|
||||
|
||||
installPhase = ''
|
||||
install -D ${kubernetes}/bin/kubectl -t $out/bin
|
||||
|
||||
installManPage "${kubernetes.man}/share/man/man1"/kubectl*
|
||||
|
||||
for shell in bash zsh; do
|
||||
$out/bin/kubectl completion $shell > kubectl.$shell
|
||||
installShellCompletion kubectl.$shell
|
||||
done
|
||||
'';
|
||||
|
||||
meta = kubernetes.meta // {
|
||||
description = "Kubernetes CLI";
|
||||
homepage = "https://github.com/kubernetes/kubectl";
|
||||
};
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue