Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
88 lines
2.1 KiB
Nix
88 lines
2.1 KiB
Nix
{
|
|
buildGoModule,
|
|
fetchFromGitHub,
|
|
fetchzip,
|
|
installShellFiles,
|
|
lib,
|
|
stdenv,
|
|
}:
|
|
|
|
let
|
|
version = "2.7.0";
|
|
srcHash = "sha256-m8DY0W9lC4QGlBuTBtAmNq3usdpjh1yQM3+AjHsJfOQ=";
|
|
vendorHash = "sha256-P7d+sljzPa4qNVc5U9bqaMz4LvDYQqHFVl/tahftyz4=";
|
|
manifestsHash = "sha256-3JWkcjcG8/G8+sdB1VBbJNXZCbM0aE303XWHl8pKYN4=";
|
|
|
|
manifests = fetchzip {
|
|
url = "https://github.com/fluxcd/flux2/releases/download/v${version}/manifests.tar.gz";
|
|
hash = manifestsHash;
|
|
stripRoot = false;
|
|
};
|
|
in
|
|
|
|
buildGoModule rec {
|
|
pname = "fluxcd";
|
|
inherit vendorHash version;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "fluxcd";
|
|
repo = "flux2";
|
|
rev = "v${version}";
|
|
hash = srcHash;
|
|
};
|
|
|
|
postUnpack = ''
|
|
cp -r ${manifests} source/cmd/flux/manifests
|
|
|
|
# disable tests that require network access
|
|
rm source/cmd/flux/create_secret_git_test.go
|
|
'';
|
|
|
|
ldflags = [
|
|
"-s"
|
|
"-w"
|
|
"-X main.VERSION=${version}"
|
|
];
|
|
|
|
subPackages = [ "cmd/flux" ];
|
|
|
|
# Required to workaround test error:
|
|
# panic: mkdir /homeless-shelter: permission denied
|
|
HOME = "$TMPDIR";
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
doInstallCheck = true;
|
|
installCheckPhase = ''
|
|
$out/bin/flux --version | grep ${version} > /dev/null
|
|
'';
|
|
|
|
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
|
for shell in bash fish zsh; do
|
|
installShellCompletion --cmd flux \
|
|
--$shell <($out/bin/flux completion $shell)
|
|
done
|
|
'';
|
|
|
|
passthru.updateScript = ./update.sh;
|
|
|
|
meta = {
|
|
changelog = "https://github.com/fluxcd/flux2/releases/tag/v${version}";
|
|
description = "Open and extensible continuous delivery solution for Kubernetes";
|
|
downloadPage = "https://github.com/fluxcd/flux2/";
|
|
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 = lib.licenses.asl20;
|
|
maintainers = with lib.maintainers; [
|
|
bryanasdev000
|
|
jlesquembre
|
|
ryan4yin
|
|
];
|
|
mainProgram = "flux";
|
|
};
|
|
}
|