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

38 lines
954 B
Nix
Raw Normal View History

{ lib, stdenv, buildGoModule, fetchFromGitHub, installShellFiles }:
2019-07-27 19:22:23 +00:00
buildGoModule rec {
pname = "fluxctl";
2020-10-18 07:14:08 +00:00
version = "1.21.0";
2019-07-27 19:22:23 +00:00
src = fetchFromGitHub {
owner = "weaveworks";
repo = "flux";
rev = version;
2020-10-18 07:14:08 +00:00
sha256 = "007i6kb80142v19w2dm3667sskcvdp1ilg3q3f9gjgr9c5nrg1m2";
2019-07-27 19:22:23 +00:00
};
2020-10-18 07:14:08 +00:00
vendorSha256 = "01v4x2mk5jglnigq0iic52f84vzx56zh46i7v2wlq8ninj8y1k0x";
2019-07-27 19:22:23 +00:00
2020-08-10 09:20:00 +00:00
nativeBuildInputs = [ installShellFiles ];
2019-07-27 19:22:23 +00:00
doCheck = false;
2019-07-27 19:22:23 +00:00
subPackages = [ "cmd/fluxctl" ];
2020-04-05 00:06:18 +00:00
buildFlagsArray = [ "-ldflags=-s -w -X main.version=${version}" ];
2020-08-10 09:20:00 +00:00
postInstall = ''
for shell in bash fish zsh; do
$out/bin/fluxctl completion $shell > fluxctl.$shell
installShellCompletion fluxctl.$shell
done
'';
meta = with lib; {
2019-07-27 19:22:23 +00:00
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 19:22:23 +00:00
license = licenses.asl20;
maintainers = with maintainers; [ Gonzih Br1ght0ne ];
2019-07-27 19:22:23 +00:00
};
}