diff options
author | Tom Wieczorek <twz123@users.noreply.github.com> | 2021-10-21 14:19:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-21 08:19:33 -0400 |
commit | bed8ee21f734a28b8fd6077a5d28cd82fd0995bd (patch) | |
tree | 18964b4ca0dadb7ce82e49e52b2d82a9e924b80f /pkgs | |
parent | e7a1dea4c82fc87c17b8de4adeb1b03e0561b7d5 (diff) |
kubecfg: install shell completions (#142449)
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
Diffstat (limited to 'pkgs')
-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"; |