mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-10-15 00:52:07 +03:00
jcli: install shell completions
This commit is contained in:
parent
6fce066442
commit
2ccadf2067
@ -1,4 +1,10 @@
|
||||
{ lib, buildGoModule, fetchFromGitHub }:
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
buildGoModule,
|
||||
fetchFromGitHub,
|
||||
installShellFiles,
|
||||
}:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "jcli";
|
||||
@ -13,17 +19,31 @@ buildGoModule rec {
|
||||
|
||||
vendorHash = "sha256-bmPnxFvdKU5zuMsCDboSOxP5f7NnMRwS/gN0sW7eTRA=";
|
||||
|
||||
ldflags = [
|
||||
"-s"
|
||||
"-w"
|
||||
"-X github.com/linuxsuren/cobra-extension/version.version=${version}"
|
||||
];
|
||||
|
||||
doCheck = false;
|
||||
|
||||
postInstall = ''
|
||||
mv $out/bin/{jenkins-cli,jcli}
|
||||
'';
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
|
||||
meta = with lib; {
|
||||
postInstall =
|
||||
''
|
||||
mv $out/bin/{jenkins-cli,jcli}
|
||||
''
|
||||
+ lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
installShellCompletion --cmd jcli \
|
||||
--bash <($out/bin/jcli completion --type bash) \
|
||||
--zsh <($out/bin/jcli completion --type zsh)
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Jenkins CLI allows you to manage your Jenkins in an easy way";
|
||||
mainProgram = "jcli";
|
||||
homepage = "https://jcli.jenkins-zh.cn/";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ sikmir ];
|
||||
homepage = "https://github.com/jenkins-zh/jenkins-cli";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ sikmir ];
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user