1{ lib
2, buildPythonApplication
3, fetchFromGitHub
4, poetry
5, cmake-format
6, pygls
7, cmake
8, pytest-datadir
9, pytestCheckHook
10}:
11
12buildPythonApplication rec {
13 pname = "cmake-language-server";
14 version = "0.1.6";
15 format = "pyproject";
16
17 src = fetchFromGitHub {
18 owner = "regen100";
19 repo = pname;
20 rev = "refs/tags/v${version}";
21 sha256 = "sha256-B7dhCQo3g2E8+fzyl1RhaYQE6TFoqoLtp9Z7sZcv5xk=";
22 };
23
24 patches = [
25 # Test timeouts occasionally cause the build to fail
26 ./disable-test-timeouts.patch
27 ];
28
29 nativeBuildInputs = [
30 poetry
31 ];
32
33 propagatedBuildInputs = [
34 cmake-format
35 pygls
36 ];
37
38 checkInputs = [
39 cmake
40 cmake-format
41 pytest-datadir
42 pytestCheckHook
43 ];
44
45 dontUseCmakeConfigure = true;
46 pythonImportsCheck = [ "cmake_language_server" ];
47
48 meta = with lib; {
49 description = "CMake LSP Implementation";
50 homepage = "https://github.com/regen100/cmake-language-server";
51 license = licenses.mit;
52 maintainers = with maintainers; [ kira-bruneau ];
53 };
54}