depot/third_party/nixpkgs/pkgs/development/python-modules/pygls/default.nix

59 lines
1.2 KiB
Nix
Raw Normal View History

{ lib
, stdenv
, buildPythonPackage
, pythonOlder
, fetchFromGitHub
, poetry-core
, lsprotocol
, typeguard
, pytest-asyncio
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "pygls";
version = "1.1.2";
format = "pyproject";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "openlawlibrary";
repo = "pygls";
rev = "refs/tags/v${version}";
hash = "sha256-OfLlYTgVCg+oiYww0RjRTjiBwTZBSNqJRryo8gZEmk4=";
};
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 ];
};
}