2021-01-25 08:26:54 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
|
2020-12-09 19:45:35 +00:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "fluxcd";
|
2021-02-01 18:01:08 +00:00
|
|
|
version = "0.7.5";
|
2020-12-09 19:45:35 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "fluxcd";
|
|
|
|
repo = "flux2";
|
|
|
|
rev = "v${version}";
|
2021-02-01 18:01:08 +00:00
|
|
|
sha256 = "1drbfjigrabiqy9mlgbipm8x3mf2hvz7gwgndqky3f3y3h5whvbd";
|
2020-12-09 19:45:35 +00:00
|
|
|
};
|
|
|
|
|
2021-02-01 18:01:08 +00:00
|
|
|
vendorSha256 = "144dkynr4wkykdbh39q8m2nhkxfq15h0vj7ga58lli8gxrs5mwln";
|
2020-12-09 19:45:35 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
subPackages = [ "cmd/flux" ];
|
|
|
|
|
|
|
|
buildFlagsArray = [ "-ldflags=-s -w -X main.VERSION=${version}" ];
|
|
|
|
|
2021-01-27 15:09:39 +00:00
|
|
|
doInstallCheck = true;
|
|
|
|
installCheckPhase = ''
|
|
|
|
$out/bin/flux --version | grep ${version} > /dev/null
|
|
|
|
'';
|
|
|
|
|
2020-12-09 19:45:35 +00:00
|
|
|
postInstall = ''
|
|
|
|
for shell in bash fish zsh; do
|
|
|
|
$out/bin/flux completion $shell > flux.$shell
|
|
|
|
installShellCompletion flux.$shell
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-12-09 19:45:35 +00:00
|
|
|
description = "Open and extensible continuous delivery solution for Kubernetes";
|
|
|
|
longDescription = ''
|
|
|
|
Flux is a tool for keeping Kubernetes clusters in sync
|
|
|
|
with sources of configuration (like Git repositories), and automating
|
|
|
|
updates to configuration when there is new code to deploy.
|
|
|
|
'';
|
|
|
|
homepage = "https://fluxcd.io";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ jlesquembre ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|