Files
infra/overlays/nixpkgs-pr-578265-posthog.nix
kurogeek 70be800f77 overlays: work around nixpkgs#578265 (posthog broken with mcp 2)
nixpkgs#575004 bumped mcp 1.29 -> 2.2 and marked python3Packages.posthog
broken; only one optional MCP test fails. frappe needs posthog at runtime.
Skip that test and clear meta.broken until the upstream unbreak lands;
the overlay warns at eval time once it does.
2026-10-26 06:53:24 +00:00

34 lines
1.4 KiB
Nix

# TEMPORARY workaround for NixOS/nixpkgs#578265 (python3Packages.posthog: unbreak).
# nixpkgs#575004 bumped mcp 1.29 -> 2.2 and marked posthog broken; the only
# failure is one test in posthog's optional MCP integration (field rename in
# mcp 2). posthog is a runtime dependency of frappe, so frappix machines fail
# to evaluate without this.
#
# Remove once `nix flake update` pulls the PR in: delete this file and every
# reference to it (grep 578265). The overlay becomes a no-op and warns at eval
# time as soon as the locked nixpkgs no longer marks posthog broken.
_final: prev:
let
inherit (prev) lib;
in
{
pythonPackagesExtensions = prev.pythonPackagesExtensions ++ [
(_pyFinal: pyPrev: {
posthog =
if !pyPrev.posthog.meta.broken then
lib.warn "nixpkgs no longer marks posthog broken: NixOS/nixpkgs#578265 has landed, remove overlays/nixpkgs-pr-578265-posthog.nix" pyPrev.posthog
else
pyPrev.posthog.overridePythonAttrs (old: {
disabledTests = old.disabledTests ++ [
# AttributeError: 'CallToolResult' object has no attribute 'structuredContent'
# (mcp>=2 renamed the field to `structured_content`)
"test_prepare_tool_result_delivers_into_call_tool_result_models"
];
meta = old.meta // {
broken = false;
};
});
})
];
}