Files
Dark Steveneq 646b892680
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
push sheeet
2025-10-09 14:15:47 +02:00

69 lines
2.0 KiB
Nix

{
lib,
buildGoModule,
fetchFromGitHub,
installShellFiles,
versionCheckHook,
nix-update-script,
stdenv,
}:
buildGoModule (finalAttrs: {
pname = "fluxcd-operator-mcp";
version = "0.29.0";
src = fetchFromGitHub {
owner = "controlplaneio-fluxcd";
repo = "fluxcd-operator";
tag = "v${finalAttrs.version}";
hash = "sha256-yV8aGmY2mUAu0urIi7d1pIjhJasRX17hpmvFEQm4YpY=";
};
vendorHash = "sha256-zCzMNlpBBUS2P2aywFDUp/RSl+HlfQe+L8a1+vVYbgY=";
ldflags = [
"-s"
"-w"
"-X main.VERSION=${finalAttrs.version}"
];
subPackages = [ "cmd/mcp" ];
nativeBuildInputs = [ installShellFiles ];
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgram = "${placeholder "out"}/bin/flux-operator-mcp";
versionCheckProgramArg = "--version";
doInstallCheck = true;
env.CGO_ENABLED = 0;
postInstall = ''
mv $out/bin/mcp $out/bin/flux-operator-mcp
''
+ lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
for shell in bash fish zsh; do
installShellCompletion --cmd flux-operator-mcp \
--$shell <($out/bin/flux-operator-mcp completion $shell)
done
'';
passthru.updateScript = nix-update-script { };
meta = {
description = "Kubernetes controller for managing the lifecycle of Flux CD";
homepage = "https://fluxcd.control-plane.io/mcp/";
downloadPage = "https://github.com/controlplaneio-fluxcd/flux-operator";
longDescription = ''
The Flux Operator is a Kubernetes CRD controller that manages the lifecycle of CNCF Flux CD
and the ControlPlane enterprise distribution. The operator extends Flux with self-service
capabilities and preview environments for GitLab and GitHub pull requests testing.
'';
changelog = "https://github.com/controlplaneio-fluxcd/flux-operator/releases/tag/v${finalAttrs.version}";
license = lib.licenses.agpl3Only;
maintainers = with lib.maintainers; [
mattfield
];
mainProgram = "flux-operator-mcp";
};
})