2021-10-04 05:53:33 +01:00
|
|
|
{ lib
|
|
|
|
, buildPythonApplication
|
|
|
|
, fetchFromGitHub
|
|
|
|
, poetry
|
|
|
|
, pygls
|
|
|
|
, pyparsing
|
|
|
|
, cmake
|
|
|
|
, pytest-datadir
|
|
|
|
, pytestCheckHook
|
2020-05-28 00:21:24 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonApplication rec {
|
|
|
|
pname = "cmake-language-server";
|
2021-10-04 05:53:33 +01:00
|
|
|
version = "0.1.3";
|
2020-05-28 00:21:24 +01:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "regen100";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-10-04 05:53:33 +01:00
|
|
|
sha256 = "sha256-eZBnygEYjLzk29tvLGg1JdhCECc5x2MewHRSChMuCjo=";
|
2020-05-28 00:21:24 +01:00
|
|
|
};
|
|
|
|
|
2021-05-17 23:34:28 +01:00
|
|
|
patches = [
|
2021-10-04 05:53:33 +01:00
|
|
|
# Test timeouts occasionally cause the build to fail
|
2021-05-17 23:34:28 +01:00
|
|
|
./disable-test-timeouts.patch
|
|
|
|
];
|
2020-07-30 05:54:49 +01:00
|
|
|
|
2022-02-21 11:47:25 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace 'pyparsing = "^2.4"' 'pyparsing = "^3.0.6"'
|
|
|
|
'';
|
|
|
|
|
2020-05-28 00:21:24 +01:00
|
|
|
nativeBuildInputs = [ poetry ];
|
|
|
|
propagatedBuildInputs = [ pygls pyparsing ];
|
|
|
|
|
2021-10-04 05:53:33 +01:00
|
|
|
checkInputs = [ cmake pytest-datadir pytestCheckHook ];
|
2020-05-28 00:21:24 +01:00
|
|
|
dontUseCmakeConfigure = true;
|
2021-10-04 05:53:33 +01:00
|
|
|
pythonImportsCheck = [ "cmake_language_server" ];
|
2020-05-28 00:21:24 +01:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-05-28 00:21:24 +01:00
|
|
|
description = "CMake LSP Implementation";
|
2021-10-04 05:53:33 +01:00
|
|
|
homepage = "https://github.com/regen100/cmake-language-server";
|
2020-05-28 00:21:24 +01:00
|
|
|
license = licenses.mit;
|
2021-05-22 15:47:40 +01:00
|
|
|
maintainers = with maintainers; [ kira-bruneau ];
|
2020-05-28 00:21:24 +01:00
|
|
|
};
|
|
|
|
}
|