eksctl: install fish completions

This commit is contained in:
Mario Rodas 2020-07-03 04:20:00 -05:00
parent a76df90185
commit 9685a03679

View File

@ -1,4 +1,4 @@
{ lib, buildGoModule, fetchFromGitHub }: { lib, buildGoModule, fetchFromGitHub, installShellFiles }:
buildGoModule rec { buildGoModule rec {
pname = "eksctl"; pname = "eksctl";
@ -17,11 +17,13 @@ buildGoModule rec {
buildFlags = [ "-tags netgo" "-tags release" ]; buildFlags = [ "-tags netgo" "-tags release" ];
postInstall = '' nativeBuildInputs = [ installShellFiles ];
mkdir -p "$out/share/"{bash-completion/completions,zsh/site-functions}
$out/bin/eksctl completion bash > "$out/share/bash-completion/completions/eksctl" postInstall = ''
$out/bin/eksctl completion zsh > "$out/share/zsh/site-functions/_eksctl" for shell in bash fish zsh; do
$out/bin/eksctl completion $shell > eksctl.$shell
installShellCompletion eksctl.$shell
done
''; '';
meta = with lib; { meta = with lib; {