2021-10-04 12:37:57 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonApplication
|
2024-01-25 14:12:00 +00:00
|
|
|
, pythonOlder
|
2021-10-04 12:37:57 +00:00
|
|
|
, fetchFromGitHub
|
2024-01-25 14:12:00 +00:00
|
|
|
, pdm-backend
|
2022-08-12 12:06:08 +00:00
|
|
|
, cmake-format
|
2021-10-04 12:37:57 +00:00
|
|
|
, pygls
|
|
|
|
, cmake
|
|
|
|
, pytest-datadir
|
|
|
|
, pytestCheckHook
|
2020-05-29 06:06:01 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonApplication rec {
|
|
|
|
pname = "cmake-language-server";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "0.1.10";
|
2020-05-29 06:06:01 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2023-11-16 04:20:00 +00:00
|
|
|
|
2020-05-29 06:06:01 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "regen100";
|
2023-03-15 16:39:30 +00:00
|
|
|
repo = "cmake-language-server";
|
|
|
|
rev = "refs/tags/v${version}";
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-9fnyDJm8rUl+7g4FrdMykPpQOcww2M6IPWH/3qVeJX4=";
|
2020-05-29 06:06:01 +00:00
|
|
|
};
|
|
|
|
|
2021-05-28 09:39:13 +00:00
|
|
|
patches = [
|
2021-10-04 12:37:57 +00:00
|
|
|
# Test timeouts occasionally cause the build to fail
|
2021-05-28 09:39:13 +00:00
|
|
|
./disable-test-timeouts.patch
|
|
|
|
];
|
2020-08-20 17:08:02 +00:00
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
nativeBuildInputs = [
|
2023-11-16 04:20:00 +00:00
|
|
|
pdm-backend
|
2022-08-12 12:06:08 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
cmake-format
|
|
|
|
pygls
|
|
|
|
];
|
2022-03-05 16:20:37 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-08-12 12:06:08 +00:00
|
|
|
cmake
|
|
|
|
cmake-format
|
|
|
|
pytest-datadir
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2020-05-29 06:06:01 +00:00
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
# version.py generated by pdm, no idea why it's not present in test phase
|
|
|
|
# https://github.com/regen100/cmake-language-server/blob/68bbc8187b6110a75f498647af7c44df790ffa87/pyproject.toml#L35-L36
|
|
|
|
preCheck = ''
|
|
|
|
echo "__version__ = \"$PDM_BUILD_SCM_VERSION\"" > cmake_language_server/version.py
|
|
|
|
'';
|
|
|
|
|
|
|
|
postCheck = ''
|
|
|
|
rm cmake_language_server/version.py
|
|
|
|
'';
|
|
|
|
|
2020-05-29 06:06:01 +00:00
|
|
|
dontUseCmakeConfigure = true;
|
2023-02-02 18:25:31 +00:00
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"cmake_language_server"
|
|
|
|
];
|
2020-05-29 06:06:01 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-05-29 06:06:01 +00:00
|
|
|
description = "CMake LSP Implementation";
|
2021-10-04 12:37:57 +00:00
|
|
|
homepage = "https://github.com/regen100/cmake-language-server";
|
2024-01-25 14:12:00 +00:00
|
|
|
changelog = "https://github.com/regen100/cmake-language-server/releases/tag/v${version}";
|
2020-05-29 06:06:01 +00:00
|
|
|
license = licenses.mit;
|
2021-05-28 09:39:13 +00:00
|
|
|
maintainers = with maintainers; [ kira-bruneau ];
|
2024-01-13 08:15:51 +00:00
|
|
|
mainProgram = "cmake-language-server";
|
2020-05-29 06:06:01 +00:00
|
|
|
};
|
|
|
|
}
|