Merge pull request #140440 from kira-bruneau/cmake-language-server

This commit is contained in:
Sandro 2021-10-04 14:26:22 +02:00 committed by GitHub
commit e3572c0901
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 35 additions and 23 deletions

View File

@ -2,6 +2,9 @@
, buildPythonPackage
, isPy3k
, fetchFromGitHub
, setuptools-scm
, pydantic
, typeguard
, mock
, pytest-asyncio
, pytestCheckHook
@ -9,17 +12,31 @@
buildPythonPackage rec {
pname = "pygls";
version = "0.9.1";
version = "0.11.2";
disabled = !isPy3k;
src = fetchFromGitHub {
owner = "openlawlibrary";
repo = pname;
rev = "v${version}";
sha256 = "1v7x5598d6jg8ya0spqjma56y062rznwimsrp8nq6fkskqgfm0ds";
sha256 = "sha256-zgQ5m198HMyFFrASSYCzn0EDLLeVy2j4LD0rEyEgahQ=";
};
checkInputs = [ mock pytest-asyncio pytestCheckHook ];
SETUPTOOLS_SCM_PRETEND_VERSION = version;
nativeBuildInputs = [ setuptools-scm ];
propagatedBuildInputs = [
pydantic
typeguard
];
checkInputs = [
mock
pytest-asyncio
pytestCheckHook
];
pythonImportsCheck = [ "pygls" ];
meta = with lib; {
description = "Pythonic generic implementation of the Language Server Protocol";

View File

@ -1,46 +1,41 @@
{ lib, stdenv, buildPythonApplication, fetchFromGitHub
, poetry, pygls, pyparsing
, cmake, pytest, pytest-datadir
, fetchpatch
{ lib
, buildPythonApplication
, fetchFromGitHub
, poetry
, pygls
, pyparsing
, cmake
, pytest-datadir
, pytestCheckHook
}:
buildPythonApplication rec {
pname = "cmake-language-server";
version = "0.1.2";
version = "0.1.3";
format = "pyproject";
src = fetchFromGitHub {
owner = "regen100";
repo = pname;
rev = "v${version}";
sha256 = "0vz7bjxkk0phjhz3h9kj6yr7wnk3g7lqmkqraa0kw12mzcfck837";
sha256 = "sha256-eZBnygEYjLzk29tvLGg1JdhCECc5x2MewHRSChMuCjo=";
};
patches = [
# Test timeouts occasionally cause the build to fail
./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";
})
];
postPatch = ''
substituteInPlace pyproject.toml \
--replace 'pygls = "^0.8.1"' 'pygls = "^0.9.0"'
'';
nativeBuildInputs = [ poetry ];
propagatedBuildInputs = [ pygls pyparsing ];
checkInputs = [ cmake pytest pytest-datadir ];
checkInputs = [ cmake pytest-datadir pytestCheckHook ];
dontUseCmakeConfigure = true;
checkPhase = "pytest";
pythonImportsCheck = [ "cmake_language_server" ];
meta = with lib; {
homepage = "https://github.com/regen100/cmake-language-server";
description = "CMake LSP Implementation";
homepage = "https://github.com/regen100/cmake-language-server";
license = licenses.mit;
maintainers = with maintainers; [ kira-bruneau ];
};