# 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; }; }); }) ]; }