nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 22.05 59 lines 1.3 kB view raw
1{ lib 2, buildPythonPackage 3, isPy3k 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.11.3"; 17 format = "setuptools"; 18 disabled = !isPy3k; 19 20 src = fetchFromGitHub { 21 owner = "openlawlibrary"; 22 repo = pname; 23 rev = "v${version}"; 24 sha256 = "sha256-/nmDaA67XzrrmfwlBm5syTS4hn25m30Zb3gvOdL+bR8="; 25 }; 26 27 SETUPTOOLS_SCM_PRETEND_VERSION = version; 28 nativeBuildInputs = [ setuptools-scm ]; 29 30 propagatedBuildInputs = [ 31 pydantic 32 toml 33 typeguard 34 ]; 35 # We don't know why an early version of pydantic is required, see: 36 # https://github.com/openlawlibrary/pygls/issues/221 37 preBuild = '' 38 substituteInPlace setup.cfg \ 39 --replace "pydantic>=1.7,<1.9" "pydantic" 40 ''; 41 42 checkInputs = [ 43 mock 44 pytest-asyncio 45 pytestCheckHook 46 ]; 47 48 # Fixes hanging tests on Darwin 49 __darwinAllowLocalNetworking = true; 50 51 pythonImportsCheck = [ "pygls" ]; 52 53 meta = with lib; { 54 description = "Pythonic generic implementation of the Language Server Protocol"; 55 homepage = "https://github.com/openlawlibrary/pygls"; 56 license = licenses.asl20; 57 maintainers = with maintainers; [ kira-bruneau ]; 58 }; 59}