ruff-lsp: don't use ambient PYTHONPATH

This allows `ruff-lsp` to function in Python environments that contain
dependencies that would otherwise break `ruff-lsp`.
This commit is contained in:
Charles Hall
2023-06-23 16:30:13 -07:00
parent 3f7e8aa057
commit 89bb97bfe1
@@ -53,6 +53,11 @@ buildPythonPackage rec {
makeWrapperArgs = [
# prefer ruff from user's PATH, that's usually desired behavior
"--suffix PATH : ${lib.makeBinPath [ ruff ]}"
# Unset ambient PYTHONPATH in the wrapper, so ruff-lsp only ever runs with
# its own, isolated set of dependencies. This works because the correct
# PYTHONPATH is set in the Python script, which runs after the wrapper.
"--unset PYTHONPATH"
];
meta = with lib; {