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.
This commit is contained in:
kurogeek committed 2026-10-26 06:53:24 +00:00
1 parent e04805f889
commit 70be800f77
2 files changed
+35 -2

No files matched your search

+2 -2
View File
@@ -2,8 +2,8 @@
{ {
flake.overlays = { flake.overlays = {
packagesOverlay = import ../pkgs/overlay.nix; packagesOverlay = import ../pkgs/overlay.nix;
# TEMPORARY: drop with the file once NixOS/nixpkgs#576853 reaches nixpkgs-unstable. # TEMPORARY: drop with the file once NixOS/nixpkgs#578265 reaches nixos-unstable.
phpPr576853Overlay = import ./nixpkgs-pr-576853-php.nix; posthogPr578265Overlay = import ./nixpkgs-pr-578265-posthog.nix;
frappixFrappeOverlay = inputs.frappix.frappeOverlay.x86_64-linux; frappixFrappeOverlay = inputs.frappix.frappeOverlay.x86_64-linux;
frappixLibsOverlay = inputs.frappix.libsOverlay.x86_64-linux; frappixLibsOverlay = inputs.frappix.libsOverlay.x86_64-linux;
+33
View File
@@ -0,0 +1,33 @@
# 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;
};
});
})
];
}