diff options
Diffstat (limited to 'nixpkgs/pkgs/applications/networking/cluster/jx/default.nix')
-rw-r--r-- | nixpkgs/pkgs/applications/networking/cluster/jx/default.nix | 48 |
1 files changed, 15 insertions, 33 deletions
diff --git a/nixpkgs/pkgs/applications/networking/cluster/jx/default.nix b/nixpkgs/pkgs/applications/networking/cluster/jx/default.nix index c31389a78c23..7fd3e6b9cd91 100644 --- a/nixpkgs/pkgs/applications/networking/cluster/jx/default.nix +++ b/nixpkgs/pkgs/applications/networking/cluster/jx/default.nix @@ -1,57 +1,39 @@ -{ buildGoPackage, fetchFromGitHub, lib }: +{ buildGoModule, fetchFromGitHub, lib }: -let - removeVendoredPackages = goDeps: - '' - echo "Removing any vendored duplicate of direct dependency... " - for dir in $(find $NIX_BUILD_TOP/go/src -type d -name vendor); do - ${builtins.concatStringsSep "\n" (map (goDep: '' - if test -d $dir/${goDep.goPackagePath}; then - echo "Removing duplicate directory at $dir/${goDep.goPackagePath}" - rm -rf $dir/${goDep.goPackagePath} - fi - '') goDeps)} - done - echo "Done" - ''; -in -buildGoPackage rec { +buildGoModule rec { name = "jx"; - version = "1.3.955"; - - goPackagePath = "github.com/jenkins-x/jx"; - subPackages = [ "cmd/jx" ]; + version = "1.3.967"; src = fetchFromGitHub { owner = "jenkins-x"; repo = "jx"; rev = "v${version}"; - sha256 = "0h4ck1a8rlyg10gaxbnwvlabwjlhdrigrina84x4m2gsqr3lnp9a"; + sha256 = "0a25m7sz134kch21bg6l86kvwl4cg6babqf57kqidq6kid1zgdaq"; }; - # Some of the dependencies have their own checked in vendor directory that - # vendor their dependencies. However, some of those dependencies are also - # directly pulled down through the vgo modules. Removing these dependencies - # as they confuse the go compiler and causes the build to fail. - # Removing all the vendor directories also breaks the build. - preBuild = removeVendoredPackages (import goDeps); + patches = [ + # https://github.com/jenkins-x/jx/pull/3321 + ./3321-fix-location-of-thrift.patch + ]; + + modSha256 = "0l6ccxzfxl918hzbky5ivlw413hiwagwc2cbp3f05i21qdi5mw5p"; + + subPackages = [ "cmd/jx" ]; buildFlagsArray = '' -ldflags= - -X ${goPackagePath}/pkg/version.Version=${version} - -X ${goPackagePath}/pkg/version.Revision=${version} + -X github.com/jenkins-x/jx/pkg/version.Version=${version} + -X github.com/jenkins-x/jx/pkg/version.Revision=${version} ''; - goDeps = ./deps.nix; - meta = with lib; { description = "JX is a command line tool for installing and using Jenkins X."; + homepage = https://jenkins-x.io; longDescription = '' Jenkins X provides automated CI+CD for Kubernetes with Preview Environments on Pull Requests using Jenkins, Knative Build, Prow, Skaffold and Helm. ''; - homepage = https://github.com/jenkins-x/jx; license = licenses.asl20 ; maintainers = with maintainers; [ kalbasit ]; platforms = platforms.linux ++ platforms.darwin; |