Skip to content

Commit 2199bae

Browse files
authored
ruff-lsp: ruff is now a python package (#350729)
2 parents 80705af + 3033272 commit 2199bae

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

pkgs/by-name/ru/ruff-lsp/package.nix

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
python3Packages,
44
fetchFromGitHub,
55

6-
# nativeCheckInputs
7-
ruff,
8-
96
# tests
107
versionCheckHook,
118

@@ -25,33 +22,28 @@ python3Packages.buildPythonApplication rec {
2522
hash = "sha256-TB4OcKkaUGYAmiGNJRnfRmiXTyTQL4sFoBrzxT6DWec=";
2623
};
2724

28-
postPatch = ''
29-
# ruff binary added to PATH in wrapper so it's not needed
30-
sed -i '/"ruff>=/d' pyproject.toml
31-
'';
32-
3325
build-system = with python3Packages; [ hatchling ];
3426

3527
dependencies = with python3Packages; [
3628
packaging
3729
pygls
3830
lsprotocol
31+
ruff
3932
typing-extensions
4033
];
4134

4235
nativeCheckInputs = with python3Packages; [
4336
pytestCheckHook
4437
pytest-asyncio
4538
python-lsp-jsonrpc
46-
ruff
39+
ruff.bin
4740
versionCheckHook
4841
];
4942
versionCheckProgramArg = [ "--version" ];
5043

5144
makeWrapperArgs = [
5245
# prefer ruff from user's PATH, that's usually desired behavior
53-
"--suffix PATH : ${lib.makeBinPath [ ruff ]}"
54-
46+
"--suffix PATH : ${lib.makeBinPath (with python3Packages; [ ruff ])}"
5547
# Unset ambient PYTHONPATH in the wrapper, so ruff-lsp only ever runs with
5648
# its own, isolated set of dependencies. This works because the correct
5749
# PYTHONPATH is set in the Python script, which runs after the wrapper.

0 commit comments

Comments
 (0)