File tree Expand file tree Collapse file tree 1 file changed +16
-9
lines changed
Expand file tree Collapse file tree 1 file changed +16
-9
lines changed Original file line number Diff line number Diff line change 22 lib ,
33 stdenv ,
44 buildGoModule ,
5+ buildPackages ,
56 fetchFromGitHub ,
67 installShellFiles ,
78} :
89
910buildGoModule 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 } ;
You can’t perform that action at this time.
0 commit comments