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
|
2022-08-12 12:06:08 +00:00
|
|
|
, pythonOlder
|
2020-10-07 09:15:18 +00:00
|
|
|
, fetchFromGitHub
|
2021-10-04 12:37:57 +00:00
|
|
|
, setuptools-scm
|
2023-02-02 18:25:31 +00:00
|
|
|
, lsprotocol
|
2022-04-15 01:41:22 +00:00
|
|
|
, toml
|
2021-10-04 12:37:57 +00:00
|
|
|
, typeguard
|
2020-10-07 09:15:18 +00:00
|
|
|
, mock
|
|
|
|
, pytest-asyncio
|
|
|
|
, pytestCheckHook
|
2020-05-29 06:06:01 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pygls";
|
2023-03-15 16:39:30 +00:00
|
|
|
version = "1.0.1";
|
2022-04-15 01:41:22 +00:00
|
|
|
format = "setuptools";
|
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}";
|
|
|
|
hash = "sha256-ovm897Vu6HRziGee3NioM1BA65mLe3F5Z2k0E+A35Gs=";
|
2020-05-29 06:06:01 +00:00
|
|
|
};
|
|
|
|
|
2021-10-04 12:37:57 +00:00
|
|
|
SETUPTOOLS_SCM_PRETEND_VERSION = version;
|
2022-12-02 08:20:57 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools-scm
|
|
|
|
toml
|
|
|
|
];
|
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
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-10-04 12:37:57 +00:00
|
|
|
mock
|
|
|
|
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
|
|
|
|
'';
|
|
|
|
|
2021-10-04 12:37:57 +00:00
|
|
|
pythonImportsCheck = [ "pygls" ];
|
2020-05-29 06:06:01 +00:00
|
|
|
|
2020-10-07 09:15:18 +00:00
|
|
|
meta = with lib; {
|
2022-12-02 08:20:57 +00:00
|
|
|
changelog = "https://github.com/openlawlibrary/pygls/blob/${src.rev}/CHANGELOG.md";
|
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";
|
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
|
|
|
};
|
|
|
|
}
|