From 935f82784b191a545c9a256ba09bce8b3dae4fca Mon Sep 17 00:00:00 2001 From: Kira Bruneau Date: Mon, 17 May 2021 18:34:28 -0400 Subject: [PATCH] cmake-language-server: disable test timeouts --- .../tools/cmake-language-server/default.nix | 14 +++++++++----- .../disable-test-timeouts.patch | 13 +++++++++++++ 2 files changed, 22 insertions(+), 5 deletions(-) create mode 100644 pkgs/development/tools/cmake-language-server/disable-test-timeouts.patch diff --git a/pkgs/development/tools/cmake-language-server/default.nix b/pkgs/development/tools/cmake-language-server/default.nix index 2c85890e70bf..e071b8aad50f 100644 --- a/pkgs/development/tools/cmake-language-server/default.nix +++ b/pkgs/development/tools/cmake-language-server/default.nix @@ -16,11 +16,15 @@ buildPythonApplication rec { sha256 = "0vz7bjxkk0phjhz3h9kj6yr7wnk3g7lqmkqraa0kw12mzcfck837"; }; - # can be removed after v0.1.2 - patches = lib.optional stdenv.isDarwin (fetchpatch { - url = "https://github.com/regen100/cmake-language-server/commit/0ec120f39127f25898ab110b43819e3e9becb8a3.patch"; - sha256 = "1xbmarvsvzd61fnlap4qscnijli2rw2iqr7cyyvar2jd87z6sfp0"; - }); + patches = [ + ./disable-test-timeouts.patch + ] ++ lib.optionals stdenv.isDarwin [ + # can be removed after v0.1.2 + (fetchpatch { + url = "https://github.com/regen100/cmake-language-server/commit/0ec120f39127f25898ab110b43819e3e9becb8a3.patch"; + sha256 = "1xbmarvsvzd61fnlap4qscnijli2rw2iqr7cyyvar2jd87z6sfp0"; + }) + ]; postPatch = '' substituteInPlace pyproject.toml \ diff --git a/pkgs/development/tools/cmake-language-server/disable-test-timeouts.patch b/pkgs/development/tools/cmake-language-server/disable-test-timeouts.patch new file mode 100644 index 000000000000..febe7cf77e71 --- /dev/null +++ b/pkgs/development/tools/cmake-language-server/disable-test-timeouts.patch @@ -0,0 +1,13 @@ +diff --git a/tests/test_server.py b/tests/test_server.py +index c0777f5..1184fb3 100644 +--- a/tests/test_server.py ++++ b/tests/test_server.py +@@ -11,7 +11,7 @@ from pygls.types import (CompletionContext, CompletionParams, + InitializeParams, Position, TextDocumentIdentifier, + TextDocumentItem, TextDocumentPositionParams) + +-CALL_TIMEOUT = 2 ++CALL_TIMEOUT = None + + + def _init(client: LanguageServer, root: Path):