{ lib , stdenv , buildPythonPackage , pythonOlder , fetchFromGitHub , poetry-core , lsprotocol , typeguard , pytest-asyncio , pytestCheckHook }: buildPythonPackage rec { pname = "pygls"; version = "1.2.1"; format = "pyproject"; disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "openlawlibrary"; repo = "pygls"; rev = "refs/tags/v${version}"; hash = "sha256-ARez9fs50kScfMp/W/aFIOcJonpFrcfyrzJuVwou7fk="; }; nativeBuildInputs = [ poetry-core ]; propagatedBuildInputs = [ lsprotocol typeguard ]; nativeCheckInputs = [ pytest-asyncio pytestCheckHook ]; # Fixes hanging tests on Darwin __darwinAllowLocalNetworking = true; preCheck = lib.optionalString stdenv.isDarwin '' # Darwin issue: OSError: [Errno 24] Too many open files ulimit -n 1024 ''; pythonImportsCheck = [ "pygls" ]; meta = with lib; { description = "Pythonic generic implementation of the Language Server Protocol"; homepage = "https://github.com/openlawlibrary/pygls"; changelog = "https://github.com/openlawlibrary/pygls/blob/${src.rev}/CHANGELOG.md"; license = licenses.asl20; maintainers = with maintainers; [ kira-bruneau ]; }; }