kubernetes-helm: Add shell completion

This commit is contained in:
Giacomo Longo 2019-12-13 22:37:30 +01:00
parent 6498f468af
commit 1e89cf04c6

View File

@ -1,4 +1,4 @@
{ stdenv, buildGoModule, fetchFromGitHub }:
{ stdenv, buildGoModule, fetchFromGitHub, installShellFiles }:
buildGoModule rec {
pname = "helm";
@ -16,6 +16,13 @@ buildGoModule rec {
subPackages = [ "cmd/helm" ];
buildFlagsArray = [ "-ldflags=-w -s -X helm.sh/helm/v3/internal/version.gitCommit=v${version}" ];
nativeBuildInputs = [ installShellFiles ];
postInstall = ''
$out/bin/helm completion bash > helm.bash
$out/bin/helm completion zsh > helm.zsh
installShellCompletion helm.{bash,zsh}
'';
meta = with stdenv.lib; {
homepage = https://github.com/kubernetes/helm;
description = "A package manager for kubernetes";