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 {
|
buildGoModule rec {
|
||||||
pname = "jx";
|
pname = "jx";
|
||||||
@ -15,12 +15,21 @@ buildGoModule rec {
|
|||||||
|
|
||||||
subPackages = [ "cmd/jx" ];
|
subPackages = [ "cmd/jx" ];
|
||||||
|
|
||||||
|
nativeBuildInputs = [ installShellFiles ];
|
||||||
|
|
||||||
buildFlagsArray = ''
|
buildFlagsArray = ''
|
||||||
-ldflags=
|
-ldflags=
|
||||||
-X github.com/jenkins-x/jx/pkg/version.Version=${version}
|
-X github.com/jenkins-x/jx/pkg/version.Version=${version}
|
||||||
-X github.com/jenkins-x/jx/pkg/version.Revision=${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; {
|
meta = with lib; {
|
||||||
description = "JX is a command line tool for installing and using Jenkins X.";
|
description = "JX is a command line tool for installing and using Jenkins X.";
|
||||||
homepage = "https://jenkins-x.io";
|
homepage = "https://jenkins-x.io";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user