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 <lserven@gmail.com>
This commit is contained in:
squat
2026-09-14 00:04:31 +00:00
committed by Austin Horstman
parent 31e5c6a093
commit afcfb8c1dc
+1 -4
View File
@@ -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 "" + ''