12 sha256 = "sha256-ZQs1rWI31qDo/BgjrmiNnEdR2OL8bUHVz+j5VceEp2k=";
13 manifestsSha256 = "sha256-PdhR+UDquIJWtpSymtT6V7qO5fVJOkFz6RGzAx7xeb4=";
15 manifests = fetchzip {
16 url = "https://github.com/fluxcd/flux2/releases/download/v${version}/manifests.tar.gz";
17 hash = manifestsSha256;
26 src = fetchFromGitHub {
33 vendorHash = "sha256-0YH3pgFrsnh5jIsZpj/sIgfiOCTtIlPltMS5mdGz1eM=";
36 cp -r ${manifests} source/cmd/flux/manifests
38 # disable tests that require network access
39 rm source/cmd/flux/create_secret_git_test.go
45 "-X main.VERSION=${version}"
48 subPackages = [ "cmd/flux" ];
50 # Required to workaround test error:
51 # panic: mkdir /homeless-shelter: permission denied
54 nativeBuildInputs = [ installShellFiles ];
56 doInstallCheck = true;
57 installCheckPhase = ''
58 $out/bin/flux --version | grep ${version} > /dev/null
61 postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
62 for shell in bash fish zsh; do
63 installShellCompletion --cmd flux \
64 --$shell <($out/bin/flux completion $shell)
68 passthru.updateScript = ./update.sh;
71 changelog = "https://github.com/fluxcd/flux2/releases/tag/v${version}";
72 description = "Open and extensible continuous delivery solution for Kubernetes";
73 downloadPage = "https://github.com/fluxcd/flux2/";
75 Flux is a tool for keeping Kubernetes clusters in sync
76 with sources of configuration (like Git repositories), and automating
77 updates to configuration when there is new code to deploy.
79 homepage = "https://fluxcd.io";
80 license = lib.licenses.asl20;
81 maintainers = with lib.maintainers; [