mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-22 05:33:23 +00:00
cdfcc5cecf
Install completions for fish shell
39 lines
801 B
Nix
39 lines
801 B
Nix
{ 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*
|
|
|
|
installShellCompletion --cmd kubectl \
|
|
--bash <($out/bin/kubectl completion bash) \
|
|
--fish <($out/bin/kubectl completion fish) \
|
|
--zsh <($out/bin/kubectl completion zsh)
|
|
runHook postInstall
|
|
'';
|
|
|
|
meta = kubernetes.meta // {
|
|
description = "Kubernetes CLI";
|
|
homepage = "https://github.com/kubernetes/kubectl";
|
|
platforms = lib.platforms.unix;
|
|
};
|
|
}
|