nixpkgs/pkgs/applications/networking/cluster/jx/default.nix

50 lines
1.3 KiB
Nix
Raw Normal View History

2020-08-02 11:20:00 +02:00
{ buildGoModule, fetchFromGitHub, lib, installShellFiles }:
2019-03-06 01:52:57 +01:00
buildGoModule rec {
2020-05-11 08:04:58 +02:00
pname = "jx";
2020-09-05 04:53:59 +02:00
version = "2.1.138";
2019-03-06 01:52:57 +01:00
src = fetchFromGitHub {
owner = "jenkins-x";
repo = "jx";
rev = "v${version}";
2020-09-05 04:53:59 +02:00
sha256 = "1i45gzaql6rfplliky56lrzwjnm2qzv25kgyq7gvn9c7hjaaq65b";
2019-03-06 01:52:57 +01:00
};
2020-09-05 04:53:59 +02:00
vendorSha256 = "1wvggarakshpw7m8h0x2zvd6bshd2kzbrjynfa113z90pgksvjng";
doCheck = false;
subPackages = [ "cmd/jx" ];
2019-03-06 01:52:57 +01:00
2020-08-02 11:20:00 +02:00
nativeBuildInputs = [ installShellFiles ];
2019-03-06 01:52:57 +01:00
buildFlagsArray = ''
-ldflags=
2020-08-02 11:20:00 +02:00
-s -w
-X github.com/jenkins-x/jx/pkg/version.Version=${version}
2020-08-02 11:20:00 +02:00
-X github.com/jenkins-x/jx/pkg/version.Revision=${src.rev}
-X github.com/jenkins-x/jx/pkg/version.GitTreeState=clean
2019-03-06 01:52:57 +01:00
'';
2020-08-02 11:20:00 +02:00
postInstall = ''
for shell in bash zsh; do
$out/bin/jx completion $shell > jx.$shell
installShellCompletion jx.$shell
done
'';
meta = with lib; {
description = "JX is a command line tool for installing and using Jenkins X";
homepage = "https://jenkins-x.io";
2019-03-06 01:52:57 +01:00
longDescription = ''
Jenkins X provides automated CI+CD for Kubernetes with Preview
Environments on Pull Requests using Jenkins, Knative Build, Prow,
Skaffold and Helm.
'';
license = licenses.asl20 ;
maintainers = with maintainers; [ kalbasit ];
platforms = platforms.linux ++ platforms.darwin;
};
}