depot/third_party/nixpkgs/pkgs/development/python-modules/pygls/default.nix
Default email a0cb138ada Project import generated by Copybara.
GitOrigin-RevId: a100acd7bbf105915b0004427802286c37738fef
2023-02-02 18:25:31 +00:00

57 lines
1.1 KiB
Nix

{ lib
, buildPythonPackage
, pythonOlder
, fetchFromGitHub
, setuptools-scm
, lsprotocol
, toml
, typeguard
, mock
, pytest-asyncio
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "pygls";
version = "1.0.0";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "openlawlibrary";
repo = "pygls";
rev = "v${version}";
hash = "sha256-31J4+giK1RDBS52Q/Ia3Y/Zak7fp7gRVTQ7US/eFjtM=";
};
SETUPTOOLS_SCM_PRETEND_VERSION = version;
nativeBuildInputs = [
setuptools-scm
toml
];
propagatedBuildInputs = [
lsprotocol
typeguard
];
nativeCheckInputs = [
mock
pytest-asyncio
pytestCheckHook
];
# Fixes hanging tests on Darwin
__darwinAllowLocalNetworking = true;
pythonImportsCheck = [ "pygls" ];
meta = with lib; {
changelog = "https://github.com/openlawlibrary/pygls/blob/${src.rev}/CHANGELOG.md";
description = "Pythonic generic implementation of the Language Server Protocol";
homepage = "https://github.com/openlawlibrary/pygls";
license = licenses.asl20;
maintainers = with maintainers; [ kira-bruneau ];
};
}