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