Skip to content

Commit 399068c

Browse files
authored
jcli: 0.0.46 -> 0.0.47 (NixOS#374325)
2 parents b24e122 + dfb1fdf commit 399068c

File tree

1 file changed

+16
-9
lines changed

1 file changed

+16
-9
lines changed

pkgs/by-name/jc/jcli/package.nix

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,23 @@
22
lib,
33
stdenv,
44
buildGoModule,
5+
buildPackages,
56
fetchFromGitHub,
67
installShellFiles,
78
}:
89

910
buildGoModule rec {
1011
pname = "jcli";
11-
version = "0.0.46";
12+
version = "0.0.47";
1213

1314
src = fetchFromGitHub {
1415
owner = "jenkins-zh";
1516
repo = "jenkins-cli";
1617
tag = "v${version}";
17-
hash = "sha256-l0qpyrggDJSzaJMbhgJYVK2Y3A/R+xS0Qoy3afA/eGo=";
18+
hash = "sha256-HsuYTgGe0cDRAG5FP77CGJG+xCDSWjBthPeAclmqd44=";
1819
};
1920

20-
vendorHash = "sha256-0x0Cl6cqullGIvtQTlHTGnWz9dBCT7aMEIRSB/Cuy8k=";
21+
vendorHash = "sha256-Ld59i91k1tyR9BhlRohHiRPB8Zt3rQWMtRw+J+13TFw=";
2122

2223
ldflags = [
2324
"-s"
@@ -30,21 +31,27 @@ buildGoModule rec {
3031
nativeBuildInputs = [ installShellFiles ];
3132

3233
postInstall =
34+
let
35+
jcliBin =
36+
if stdenv.buildPlatform.canExecute stdenv.hostPlatform then
37+
"$out"
38+
else
39+
lib.getBin buildPackages.jcli;
40+
in
3341
''
3442
mv $out/bin/{jenkins-cli,jcli}
35-
''
36-
+ lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
43+
3744
installShellCompletion --cmd jcli \
38-
--bash <($out/bin/jcli completion --type bash) \
39-
--fish <($out/bin/jcli completion --type fish) \
40-
--zsh <($out/bin/jcli completion --type zsh)
45+
--bash <(${jcliBin}/bin/jcli completion --type bash) \
46+
--fish <(${jcliBin}/bin/jcli completion --type fish) \
47+
--zsh <(${jcliBin}/bin/jcli completion --type zsh)
4148
'';
4249

4350
meta = {
4451
description = "Jenkins CLI allows you to manage your Jenkins in an easy way";
4552
mainProgram = "jcli";
4653
homepage = "https://github.com/jenkins-zh/jenkins-cli";
47-
changelog = "https://github.com/jenkins-zh/jenkins-cli/releases/tag/${src.tag}";
54+
changelog = "https://github.com/jenkins-zh/jenkins-cli/releases/tag/v${version}";
4855
license = lib.licenses.mit;
4956
maintainers = with lib.maintainers; [ sikmir ];
5057
};

0 commit comments

Comments
 (0)