Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

69 lines
2.0 KiB
Nix
Raw Permalink Normal View History

2025-05-12 16:46:12 +01:00
{
lib,
buildGoModule,
fetchFromGitHub,
installShellFiles,
versionCheckHook,
nix-update-script,
stdenv,
}:
buildGoModule (finalAttrs: {
pname = "fluxcd-operator-mcp";
2025-08-07 19:28:17 +00:00
version = "0.27.0";
2025-05-12 16:46:12 +01:00
src = fetchFromGitHub {
owner = "controlplaneio-fluxcd";
repo = "fluxcd-operator";
tag = "v${finalAttrs.version}";
2025-08-07 19:28:17 +00:00
hash = "sha256-haqRBK3ctQvx2VaG2PSSFnhodO5UsBv/iv4SYmO6ijQ=";
2025-05-12 16:46:12 +01:00
};
2025-07-29 22:24:47 +00:00
vendorHash = "sha256-w7WEckmoajsR4sKCrheq34T0XC2ubnZhz6cVQmzHzN0=";
2025-05-12 16:46:12 +01:00
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";
};
})