Commit 2814ef8f authored by figsoda's avatar figsoda
Browse files

ruff-lsp: fix build on darwin

parent 5f471ee6
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@
, pythonOlder
, buildPythonPackage
, fetchFromGitHub
, fetchpatch
, ruff
, pygls
, lsprotocol
@@ -26,6 +27,20 @@ buildPythonPackage rec {
    hash = "sha256-hbnSx59uSzXHeAhZPZnCzxl+mCZIdr29uUPfQCsm/Ww=";
  };

  patches = [
    # update tests to fix compatibility with ruff 0.0.291
    # https://github.com/astral-sh/ruff-lsp/pull/250
    (fetchpatch {
      name = "bump-ruff-version.patch";
      url = "https://github.com/astral-sh/ruff-lsp/commit/35691407c4f489416a46fd2e88ef037b1204feb7.patch";
      hash = "sha256-D6k2BWDUqN4GBhjspRwg84Idr7fvKMbmAAkG3I1YOH4=";
      excludes = [
        "requirements.txt"
        "requirements-dev.txt"
      ];
    })
  ];

  postPatch = ''
    # ruff binary added to PATH in wrapper so it's not needed
    sed -i '/"ruff>=/d' pyproject.toml