diff options
Diffstat (limited to 'pkgs/by-name/ru/ruff-lsp/package.nix')
-rw-r--r-- | pkgs/by-name/ru/ruff-lsp/package.nix | 38 |
1 files changed, 14 insertions, 24 deletions
diff --git a/pkgs/by-name/ru/ruff-lsp/package.nix b/pkgs/by-name/ru/ruff-lsp/package.nix index 7048c95859c8..e924e8b95ebb 100644 --- a/pkgs/by-name/ru/ruff-lsp/package.nix +++ b/pkgs/by-name/ru/ruff-lsp/package.nix @@ -1,58 +1,49 @@ { lib, - stdenv, - python3, + python3Packages, fetchFromGitHub, - # nativeCheckInputs - ruff, + # tests + versionCheckHook, # passthru nix-update-script, - testers, - ruff-lsp, }: -python3.pkgs.buildPythonApplication rec { +python3Packages.buildPythonApplication rec { pname = "ruff-lsp"; - version = "0.0.57"; + version = "0.0.58"; pyproject = true; src = fetchFromGitHub { owner = "astral-sh"; repo = "ruff-lsp"; rev = "refs/tags/v${version}"; - hash = "sha256-w9NNdsDD+YLrCw8DHDhVx62MdwLhcN8QSmb/2rqlb5g="; + hash = "sha256-TB4OcKkaUGYAmiGNJRnfRmiXTyTQL4sFoBrzxT6DWec="; }; - postPatch = '' - # ruff binary added to PATH in wrapper so it's not needed - sed -i '/"ruff>=/d' pyproject.toml - ''; + build-system = with python3Packages; [ hatchling ]; - build-system = with python3.pkgs; [ hatchling ]; - - dependencies = with python3.pkgs; [ + dependencies = with python3Packages; [ packaging pygls lsprotocol + ruff typing-extensions ]; - # fails in linux sandbox - doCheck = stdenv.isDarwin; - - nativeCheckInputs = with python3.pkgs; [ + nativeCheckInputs = with python3Packages; [ pytestCheckHook pytest-asyncio python-lsp-jsonrpc - ruff + ruff.bin + versionCheckHook ]; + versionCheckProgramArg = [ "--version" ]; makeWrapperArgs = [ # prefer ruff from user's PATH, that's usually desired behavior - "--suffix PATH : ${lib.makeBinPath [ ruff ]}" - + "--suffix PATH : ${lib.makeBinPath (with python3Packages; [ 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. @@ -61,7 +52,6 @@ python3.pkgs.buildPythonApplication rec { passthru = { updateScript = nix-update-script { }; - tests.version = testers.testVersion { package = ruff-lsp; }; }; meta = { |