@@ -0,0 +1,43 @@
1+{ stdenv, buildGoModule, fetchFromGitHub, installShellFiles }:
2+
3+buildGoModule rec {
4+ pname = "fluxcd";
5+ version = "0.5.0";
6+
7+ src = fetchFromGitHub {
8+ owner = "fluxcd";
9+ repo = "flux2";
10+ rev = "v${version}";
11+ sha256 = "125im8br7x8djd6zagvikpc02k55pxbd97rjj3g2frj9plbryh8n";
12+ };
13+
14+ vendorSha256 = "0f818a0z71nl061db93iqb87njx66vbrra1zh92warbx8djdsr7k";
15+
16+ nativeBuildInputs = [ installShellFiles ];
17+
18+ doCheck = false;
19+
20+ subPackages = [ "cmd/flux" ];
21+
22+ buildFlagsArray = [ "-ldflags=-s -w -X main.VERSION=${version}" ];
23+
24+ postInstall = ''
25+ for shell in bash fish zsh; do
26+ $out/bin/flux completion $shell > flux.$shell
27+ installShellCompletion flux.$shell
28+ done
29+ '';
30+
31+ meta = with stdenv.lib; {
32+ description = "Open and extensible continuous delivery solution for Kubernetes";
33+ longDescription = ''
34+ Flux is a tool for keeping Kubernetes clusters in sync
35+ with sources of configuration (like Git repositories), and automating
36+ updates to configuration when there is new code to deploy.
37+ '';
38+ homepage = "https://fluxcd.io";
39+ license = licenses.asl20;
40+ maintainers = with maintainers; [ jlesquembre ];
41+ platforms = platforms.unix;
42+ };
43+}