2020-10-07 09:15:18 +00:00
|
|
|
{ lib
|
2023-03-24 00:07:29 +00:00
|
|
|
, stdenv
|
2020-10-07 09:15:18 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2023-02-02 18:25:31 +00:00
|
|
|
, lsprotocol
|
2024-01-25 14:12:00 +00:00
|
|
|
, poetry-core
|
2020-10-07 09:15:18 +00:00
|
|
|
, pytest-asyncio
|
|
|
|
, pytestCheckHook
|
2024-01-25 14:12:00 +00:00
|
|
|
, pythonOlder
|
|
|
|
, pythonRelaxDepsHook
|
|
|
|
, typeguard
|
|
|
|
, websockets
|
2020-05-29 06:06:01 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pygls";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "1.3.1";
|
2024-01-25 14:12:00 +00:00
|
|
|
pyproject = true;
|
2022-08-12 12:06:08 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-05-29 06:06:01 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "openlawlibrary";
|
2022-11-04 12:27:35 +00:00
|
|
|
repo = "pygls";
|
2023-03-15 16:39:30 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-AvrGoQ0Be1xKZhFn9XXYJpt5w+ITbDbj6NFZpaDPKao=";
|
2020-05-29 06:06:01 +00:00
|
|
|
};
|
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
pythonRelaxDeps = [
|
|
|
|
# https://github.com/openlawlibrary/pygls/pull/432
|
|
|
|
"lsprotocol"
|
|
|
|
];
|
|
|
|
|
2022-12-02 08:20:57 +00:00
|
|
|
nativeBuildInputs = [
|
2023-11-16 04:20:00 +00:00
|
|
|
poetry-core
|
2024-01-25 14:12:00 +00:00
|
|
|
pythonRelaxDepsHook
|
2022-12-02 08:20:57 +00:00
|
|
|
];
|
2021-10-04 12:37:57 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2023-02-02 18:25:31 +00:00
|
|
|
lsprotocol
|
2021-10-04 12:37:57 +00:00
|
|
|
typeguard
|
|
|
|
];
|
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
passthru.optional-dependencies = {
|
|
|
|
ws = [
|
|
|
|
websockets
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-10-04 12:37:57 +00:00
|
|
|
pytest-asyncio
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2021-10-28 06:52:43 +00:00
|
|
|
# Fixes hanging tests on Darwin
|
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
2023-03-24 00:07:29 +00:00
|
|
|
preCheck = lib.optionalString stdenv.isDarwin ''
|
|
|
|
# Darwin issue: OSError: [Errno 24] Too many open files
|
|
|
|
ulimit -n 1024
|
|
|
|
'';
|
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"pygls"
|
|
|
|
];
|
2020-05-29 06:06:01 +00:00
|
|
|
|
2020-10-07 09:15:18 +00:00
|
|
|
meta = with lib; {
|
2020-05-29 06:06:01 +00:00
|
|
|
description = "Pythonic generic implementation of the Language Server Protocol";
|
2020-10-07 09:15:18 +00:00
|
|
|
homepage = "https://github.com/openlawlibrary/pygls";
|
2024-01-25 14:12:00 +00:00
|
|
|
changelog = "https://github.com/openlawlibrary/pygls/blob/${version}/CHANGELOG.md";
|
2020-05-29 06:06:01 +00:00
|
|
|
license = licenses.asl20;
|
2021-05-28 09:39:13 +00:00
|
|
|
maintainers = with maintainers; [ kira-bruneau ];
|
2020-05-29 06:06:01 +00:00
|
|
|
};
|
|
|
|
}
|