diff options
Diffstat (limited to 'pkgs/applications/networking/cluster/kubecfg')
-rw-r--r-- | pkgs/applications/networking/cluster/kubecfg/default.nix | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/pkgs/applications/networking/cluster/kubecfg/default.nix b/pkgs/applications/networking/cluster/kubecfg/default.nix index c46c6ed263014..5efee961b424c 100644 --- a/pkgs/applications/networking/cluster/kubecfg/default.nix +++ b/pkgs/applications/networking/cluster/kubecfg/default.nix @@ -1,10 +1,8 @@ -{ lib, buildGoPackage, fetchFromGitHub, ... }: +{ lib, buildGoPackage, fetchFromGitHub, installShellFiles }: -let version = "0.21.0"; in - -buildGoPackage { +buildGoPackage rec { pname = "kubecfg"; - inherit version; + version = "0.21.0"; src = fetchFromGitHub { owner = "bitnami"; @@ -17,6 +15,14 @@ buildGoPackage { ldflags = [ "-s" "-w" "-X main.version=v${version}" ]; + nativeBuildInputs = [ installShellFiles ]; + + postInstall = '' + installShellCompletion --cmd kubecfg \ + --bash <($out/bin/kubecfg completion --shell=bash) \ + --zsh <($out/bin/kubecfg completion --shell=zsh) + ''; + meta = { description = "A tool for managing Kubernetes resources as code"; homepage = "https://github.com/bitnami/kubecfg"; |