2020-08-10 10:20:00 +01:00
|
|
|
{ stdenv, buildGoModule, fetchFromGitHub, installShellFiles }:
|
2019-07-27 20:22:23 +01:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "fluxctl";
|
2020-08-22 08:26:44 +01:00
|
|
|
version = "1.20.2";
|
2019-07-27 20:22:23 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "weaveworks";
|
|
|
|
repo = "flux";
|
|
|
|
rev = version;
|
2020-08-22 08:26:44 +01:00
|
|
|
sha256 = "1a44lmrvi5f9jr04rblhcsg3zvqzvdp9wyw4m4h4scsqp5g7dfb7";
|
2019-07-27 20:22:23 +01:00
|
|
|
};
|
|
|
|
|
2020-08-22 08:26:44 +01:00
|
|
|
vendorSha256 = "1yzh6iglrzd43yqs1b6qh1i62b6qaz3232lgxyg3gmc81p0i5kr0";
|
2019-07-27 20:22:23 +01:00
|
|
|
|
2020-08-10 10:20:00 +01:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
2019-07-27 20:22:23 +01:00
|
|
|
|
2020-08-04 01:26:27 +01:00
|
|
|
doCheck = false;
|
|
|
|
|
2019-07-27 20:22:23 +01:00
|
|
|
subPackages = [ "cmd/fluxctl" ];
|
|
|
|
|
2020-04-05 01:06:18 +01:00
|
|
|
buildFlagsArray = [ "-ldflags=-s -w -X main.version=${version}" ];
|
|
|
|
|
2020-08-10 10:20:00 +01:00
|
|
|
postInstall = ''
|
|
|
|
for shell in bash fish zsh; do
|
|
|
|
$out/bin/fluxctl completion $shell > fluxctl.$shell
|
|
|
|
installShellCompletion fluxctl.$shell
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
2019-07-27 20:22:23 +01:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "CLI client for Flux, the GitOps Kubernetes operator";
|
2019-12-03 11:51:28 +00:00
|
|
|
homepage = "https://github.com/fluxcd/flux";
|
2019-07-27 20:22:23 +01:00
|
|
|
license = licenses.asl20;
|
2019-12-03 11:51:46 +00:00
|
|
|
maintainers = with maintainers; [ Gonzih filalex77 ];
|
2019-07-27 20:22:23 +01:00
|
|
|
};
|
2020-07-31 04:58:04 +01:00
|
|
|
}
|