Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at flake-libs 69 lines 1.5 kB view raw
1{ 2 lib, 3 buildPythonApplication, 4 pythonOlder, 5 fetchFromGitHub, 6 pdm-backend, 7 cmake-format, 8 pygls, 9 cmake, 10 pytest-datadir, 11 pytestCheckHook, 12}: 13 14buildPythonApplication rec { 15 pname = "cmake-language-server"; 16 version = "0.1.11"; 17 format = "pyproject"; 18 19 disabled = pythonOlder "3.8"; 20 21 src = fetchFromGitHub { 22 owner = "regen100"; 23 repo = "cmake-language-server"; 24 tag = "v${version}"; 25 hash = "sha256-QxknG5NFYky6ZSjiIugLfHT4gXsyTBVbMMeULhQsmdk="; 26 }; 27 28 patches = [ 29 # Test timeouts occasionally cause the build to fail 30 ./disable-test-timeouts.patch 31 ]; 32 33 nativeBuildInputs = [ 34 pdm-backend 35 ]; 36 37 propagatedBuildInputs = [ 38 cmake-format 39 pygls 40 ]; 41 42 nativeCheckInputs = [ 43 cmake 44 cmake-format 45 pytest-datadir 46 pytestCheckHook 47 ]; 48 49 # version.py generated by pdm, no idea why it's not present in test phase 50 # https://github.com/regen100/cmake-language-server/blob/v0.1.11/pyproject.toml#L35-L36 51 preCheck = '' 52 echo "__version__ = \"$PDM_BUILD_SCM_VERSION\"" > cmake_language_server/version.py 53 ''; 54 55 dontUseCmakeConfigure = true; 56 57 pythonImportsCheck = [ 58 "cmake_language_server" 59 ]; 60 61 meta = with lib; { 62 description = "CMake LSP Implementation"; 63 homepage = "https://github.com/regen100/cmake-language-server"; 64 changelog = "https://github.com/regen100/cmake-language-server/releases/tag/${src.tag}"; 65 license = licenses.mit; 66 maintainers = with maintainers; [ kira-bruneau ]; 67 mainProgram = "cmake-language-server"; 68 }; 69}