From afcfb8c1dc075881bbaa6fa5745aebbdb179f8b8 Mon Sep 17 00:00:00 2001 From: squat Date: Sun, 13 Sep 2026 18:58:21 +0200 Subject: [PATCH] plugins/lsp: fix building pylsp-mypy 0.8.0 The current pinned version of nixpkgs brings in pylsp-mypy 0.8.0, which no longer tracks dependencies in setup.cfg but rather in pyproject.toml, which makes the current `substituteInPlace` fail. This changes the rule to match the patches for `rope`, `ruff` and others. Note that the pylsp-mypy project currently has an issue with their repo governance which has caused the module as it exists in pypi to diverge from the code in GitHub: https://github.com/python-lsp/pylsp-mypy/issues/113. Signed-off-by: squat --- plugins/lsp/language-servers/pylsp.nix | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/plugins/lsp/language-servers/pylsp.nix b/plugins/lsp/language-servers/pylsp.nix index caffadfb..f9fe7954 100644 --- a/plugins/lsp/language-servers/pylsp.nix +++ b/plugins/lsp/language-servers/pylsp.nix @@ -548,10 +548,7 @@ in with cfg.pythonPackage.pkgs; { pylsp_mypy = pylsp-mypy.overridePythonAttrs (old: { - postPatch = old.postPatch or "" + '' - substituteInPlace setup.cfg \ - --replace-fail "python-lsp-server >=1.7.0" "" - ''; + pythonRemoveDeps = (old.pythonRemoveDeps or [ ]) ++ [ "python-lsp-server" ]; }); isort = pyls-isort.overridePythonAttrs (old: { postPatch = old.postPatch or "" + ''