2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, buildPythonApplication, fetchFromGitHub
|
2020-05-29 06:06:01 +00:00
|
|
|
, poetry, pygls, pyparsing
|
|
|
|
, cmake, pytest, pytest-datadir
|
2020-08-20 17:08:02 +00:00
|
|
|
, fetchpatch
|
2020-05-29 06:06:01 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonApplication rec {
|
|
|
|
pname = "cmake-language-server";
|
2020-06-18 07:06:33 +00:00
|
|
|
version = "0.1.2";
|
2020-05-29 06:06:01 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "regen100";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2020-06-18 07:06:33 +00:00
|
|
|
sha256 = "0vz7bjxkk0phjhz3h9kj6yr7wnk3g7lqmkqraa0kw12mzcfck837";
|
2020-05-29 06:06:01 +00:00
|
|
|
};
|
|
|
|
|
2021-05-28 09:39:13 +00:00
|
|
|
patches = [
|
|
|
|
./disable-test-timeouts.patch
|
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
# can be removed after v0.1.2
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/regen100/cmake-language-server/commit/0ec120f39127f25898ab110b43819e3e9becb8a3.patch";
|
|
|
|
sha256 = "1xbmarvsvzd61fnlap4qscnijli2rw2iqr7cyyvar2jd87z6sfp0";
|
|
|
|
})
|
|
|
|
];
|
2020-08-20 17:08:02 +00:00
|
|
|
|
2020-07-18 16:06:22 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace 'pygls = "^0.8.1"' 'pygls = "^0.9.0"'
|
|
|
|
'';
|
|
|
|
|
2020-05-29 06:06:01 +00:00
|
|
|
nativeBuildInputs = [ poetry ];
|
|
|
|
propagatedBuildInputs = [ pygls pyparsing ];
|
|
|
|
|
|
|
|
checkInputs = [ cmake pytest pytest-datadir ];
|
|
|
|
dontUseCmakeConfigure = true;
|
|
|
|
checkPhase = "pytest";
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-05-29 06:06:01 +00:00
|
|
|
homepage = "https://github.com/regen100/cmake-language-server";
|
|
|
|
description = "CMake LSP Implementation";
|
|
|
|
license = licenses.mit;
|
2021-05-28 09:39:13 +00:00
|
|
|
maintainers = with maintainers; [ kira-bruneau ];
|
2020-05-29 06:06:01 +00:00
|
|
|
};
|
|
|
|
}
|