summary refs log tree commit diff
path: root/pkgs/applications/networking/cluster/jx
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/networking/cluster/jx')
-rw-r--r--pkgs/applications/networking/cluster/jx/3321-fix-location-of-thrift.patch36
-rw-r--r--pkgs/applications/networking/cluster/jx/default.nix28
2 files changed, 18 insertions, 46 deletions
diff --git a/pkgs/applications/networking/cluster/jx/3321-fix-location-of-thrift.patch b/pkgs/applications/networking/cluster/jx/3321-fix-location-of-thrift.patch
deleted file mode 100644
index 223d6c6c247..00000000000
--- a/pkgs/applications/networking/cluster/jx/3321-fix-location-of-thrift.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 40b8eaacb3a24c466c17c8a65938330d5805b112 Mon Sep 17 00:00:00 2001
-From: "Wael M. Nasreddine" <wael.nasreddine@gmail.com>
-Date: Fri, 8 Mar 2019 14:10:11 -0800
-Subject: [PATCH] chore: fix the location of thrift
-
-Thrift is no longer available at the git.apache.org and it's now
-distributed on GitHub at github.com/apache/thrift.
-
-fixes #3320
----
- go.mod | 2 ++
- go.sum | 1 +
- 2 files changed, 3 insertions(+)
-
-diff --git a/go.mod b/go.mod
-index 04bcc84cc..e26c4cf1d 100644
---- a/go.mod
-+++ b/go.mod
-@@ -184,3 +184,5 @@ replace k8s.io/metrics => k8s.io/metrics v0.0.0-20181128195641-3954d62a524d
- replace k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20190122181752-bebe27e40fb7
-
- replace k8s.io/client-go => k8s.io/client-go v2.0.0-alpha.0.0.20190115164855-701b91367003+incompatible
-+
-+replace git.apache.org/thrift.git => github.com/apache/thrift v0.0.0-20180902110319-2566ecd5d999
-diff --git a/go.sum b/go.sum
-index c9fdf8768..6ed69e69d 100644
---- a/go.sum
-+++ b/go.sum
-@@ -87,6 +87,7 @@ github.com/antham/chyle v1.4.0/go.mod h1:D94Z4aE/ECudyNoTHwkhqu77mjGPZtfPG8dNoeI
- github.com/antham/envh v1.2.0/go.mod h1:ocIRPHuwwjyBVBtuUJOJc2TYzGg+d23xSAZexl4y9hQ=
- github.com/antham/strumt v0.0.0-20171215230529-6776189777d3/go.mod h1:sE7EYIUE0nQzPiv5zQAmw2aVkei0j2xmb4gTIIqSFSI=
- github.com/aokoli/goutils v1.0.1/go.mod h1:SijmP0QR8LtwsmDs8Yii5Z/S4trXFGFC2oO5g9DP+DQ=
-+github.com/apache/thrift v0.0.0-20180902110319-2566ecd5d999/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ=
- github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
- github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8=
- github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da h1:8GUt8eRujhVEGZFFEjBj46YV4rDjvGrNxb0KMWYkL2I=
diff --git a/pkgs/applications/networking/cluster/jx/default.nix b/pkgs/applications/networking/cluster/jx/default.nix
index e2c0b663bef..52e483424f1 100644
--- a/pkgs/applications/networking/cluster/jx/default.nix
+++ b/pkgs/applications/networking/cluster/jx/default.nix
@@ -1,29 +1,37 @@
-{ buildGoModule, fetchFromGitHub, lib }:
+{ buildGoModule, fetchFromGitHub, lib, installShellFiles }:
 
 buildGoModule rec {
-  name = "jx";
-  version = "1.3.967";
+  pname = "jx";
+  version = "2.1.127";
 
   src = fetchFromGitHub {
     owner = "jenkins-x";
     repo = "jx";
     rev = "v${version}";
-    sha256 = "0a25m7sz134kch21bg6l86kvwl4cg6babqf57kqidq6kid1zgdaq";
+    sha256 = "01dfpnqgbrn8b6h2irq080xdm76b4jx6sd80f8x4zmyaz6hf5vlv";
   };
 
-  patches = [
-    # https://github.com/jenkins-x/jx/pull/3321
-    ./3321-fix-location-of-thrift.patch
-  ];
+  vendorSha256 = "0la92a8720l8my5r4wsbgv74y6m19ikmm0wv3l4m4w5gjyplfsxb";
 
-  modSha256 = "0ljf0c0c3pc12nmhdbrwflcaj6hs8igzjw5hi6fyhi6n9cy87vac";
+  doCheck = false;
 
   subPackages = [ "cmd/jx" ];
 
+  nativeBuildInputs = [ installShellFiles ];
+
   buildFlagsArray = ''
     -ldflags=
+    -s -w
     -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=${src.rev}
+    -X github.com/jenkins-x/jx/pkg/version.GitTreeState=clean
+  '';
+
+  postInstall = ''
+    for shell in bash zsh; do
+      $out/bin/jx completion $shell > jx.$shell
+      installShellCompletion jx.$shell
+    done
   '';
 
   meta = with lib; {