2021-01-25 09:26:54 +01:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
|
2019-07-27 21:22:23 +02:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "fluxctl";
|
2021-04-01 10:14:06 +02:00
|
|
|
version = "1.22.1";
|
2019-07-27 21:22:23 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "weaveworks";
|
|
|
|
repo = "flux";
|
|
|
|
rev = version;
|
2021-04-01 10:14:06 +02:00
|
|
|
sha256 = "sha256-SaDO3a50CLhgLafCdgKEfHpuHdIweSy5L/TUgEUv5CM=";
|
2019-07-27 21:22:23 +02:00
|
|
|
};
|
|
|
|
|
2021-04-01 10:14:06 +02:00
|
|
|
vendorSha256 = "sha256-4uSw/9lI/rdDqy78jNC9eHYW/v/sMFb+sQvwYG6GZks=";
|
2019-07-27 21:22:23 +02:00
|
|
|
|
2020-08-10 11:20:00 +02:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
2019-07-27 21:22:23 +02:00
|
|
|
|
2020-08-04 02:26:27 +02:00
|
|
|
doCheck = false;
|
|
|
|
|
2019-07-27 21:22:23 +02:00
|
|
|
subPackages = [ "cmd/fluxctl" ];
|
|
|
|
|
2020-04-05 02:06:18 +02:00
|
|
|
buildFlagsArray = [ "-ldflags=-s -w -X main.version=${version}" ];
|
|
|
|
|
2020-08-10 11:20:00 +02:00
|
|
|
postInstall = ''
|
|
|
|
for shell in bash fish zsh; do
|
|
|
|
$out/bin/fluxctl completion $shell > fluxctl.$shell
|
|
|
|
installShellCompletion fluxctl.$shell
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2019-07-27 21:22:23 +02:00
|
|
|
description = "CLI client for Flux, the GitOps Kubernetes operator";
|
2019-12-03 12:51:28 +01:00
|
|
|
homepage = "https://github.com/fluxcd/flux";
|
2019-07-27 21:22:23 +02:00
|
|
|
license = licenses.asl20;
|
2020-11-17 12:02:06 +01:00
|
|
|
maintainers = with maintainers; [ Gonzih Br1ght0ne ];
|
2019-07-27 21:22:23 +02:00
|
|
|
};
|
2020-07-31 05:58:04 +02:00
|
|
|
}
|