nixpkgs/pkgs/applications/networking/cluster/fluxctl/default.nix
2021-12-06 22:38:29 +00:00

38 lines
931 B
Nix

{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
buildGoModule rec {
pname = "fluxctl";
version = "1.24.3";
src = fetchFromGitHub {
owner = "weaveworks";
repo = "flux";
rev = version;
sha256 = "sha256-i86WwSR14hxaXWMesvG2mG8nqXd97M3TekK2FLTLL+Y=";
};
vendorSha256 = "sha256-Fw3/SMO66eExlDNcIaHM+G2kB4zb1Cih7kp8xfel/iY=";
nativeBuildInputs = [ installShellFiles ];
doCheck = false;
subPackages = [ "cmd/fluxctl" ];
ldflags = [ "-s" "-w" "-X main.version=${version}" ];
postInstall = ''
for shell in bash fish zsh; do
$out/bin/fluxctl completion $shell > fluxctl.$shell
installShellCompletion fluxctl.$shell
done
'';
meta = with lib; {
description = "CLI client for Flux, the GitOps Kubernetes operator";
homepage = "https://github.com/fluxcd/flux";
license = licenses.asl20;
maintainers = with maintainers; [ Gonzih Br1ght0ne ];
};
}