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