Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib
2, buildPythonPackage
3, pythonOlder
4, fetchFromGitHub
5, setuptools-scm
6, pydantic
7, toml
8, typeguard
9, mock
10, pytest-asyncio
11, pytestCheckHook
12}:
13
14buildPythonPackage rec {
15 pname = "pygls";
16 version = "0.13.0";
17 format = "setuptools";
18
19 disabled = pythonOlder "3.7";
20
21 src = fetchFromGitHub {
22 owner = "openlawlibrary";
23 repo = "pygls";
24 rev = "v${version}";
25 hash = "sha256-guwOnB4EEUpucfprNLLr49Yn8EdOpRzzG+cT4NCn0rA=";
26 };
27
28 SETUPTOOLS_SCM_PRETEND_VERSION = version;
29 nativeBuildInputs = [
30 setuptools-scm
31 toml
32 ];
33
34 propagatedBuildInputs = [
35 pydantic
36 typeguard
37 ];
38
39 checkInputs = [
40 mock
41 pytest-asyncio
42 pytestCheckHook
43 ];
44
45 # Fixes hanging tests on Darwin
46 __darwinAllowLocalNetworking = true;
47
48 pythonImportsCheck = [ "pygls" ];
49
50 meta = with lib; {
51 changelog = "https://github.com/openlawlibrary/pygls/blob/${src.rev}/CHANGELOG.md";
52 description = "Pythonic generic implementation of the Language Server Protocol";
53 homepage = "https://github.com/openlawlibrary/pygls";
54 license = licenses.asl20;
55 maintainers = with maintainers; [ kira-bruneau ];
56 };
57}