fluxctl: install completions
This commit is contained in:
parent
32779e6dad
commit
1eaa19a33a
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, buildGoModule, fetchFromGitHub }:
|
||||
{ stdenv, buildGoModule, fetchFromGitHub, installShellFiles }:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "fluxctl";
|
||||
|
@ -13,10 +13,19 @@ buildGoModule rec {
|
|||
|
||||
vendorSha256 = "00qm45vfz4afj8f9hikrlk96w0rdzxqq2azhzrnzfymyiwc6jk5c";
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
|
||||
subPackages = [ "cmd/fluxctl" ];
|
||||
|
||||
buildFlagsArray = [ "-ldflags=-s -w -X main.version=${version}" ];
|
||||
|
||||
postInstall = ''
|
||||
for shell in bash fish zsh; do
|
||||
$out/bin/fluxctl completion $shell > fluxctl.$shell
|
||||
installShellCompletion fluxctl.$shell
|
||||
done
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "CLI client for Flux, the GitOps Kubernetes operator";
|
||||
homepage = "https://github.com/fluxcd/flux";
|
||||
|
|
Loading…
Reference in New Issue