jx: install completions
This commit is contained in:
parent
42b1a207c9
commit
ca9f18df45
@ -1,4 +1,4 @@
|
||||
{ buildGoModule, fetchFromGitHub, lib }:
|
||||
{ buildGoModule, fetchFromGitHub, lib, installShellFiles }:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "jx";
|
||||
@ -15,12 +15,21 @@ buildGoModule rec {
|
||||
|
||||
subPackages = [ "cmd/jx" ];
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
|
||||
buildFlagsArray = ''
|
||||
-ldflags=
|
||||
-X github.com/jenkins-x/jx/pkg/version.Version=${version}
|
||||
-X github.com/jenkins-x/jx/pkg/version.Revision=${version}
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
for shell in bash zsh; do
|
||||
$out/bin/jx completion $shell > jx.$shell
|
||||
installShellCompletion jx.$shell
|
||||
done
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "JX is a command line tool for installing and using Jenkins X.";
|
||||
homepage = "https://jenkins-x.io";
|
||||
|
Loading…
Reference in New Issue
Block a user