nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 69 lines 1.4 kB view raw
1{ 2 lib, 3 stdenv, 4 buildPythonPackage, 5 fetchFromGitHub, 6 lsprotocol, 7 poetry-core, 8 pytest-asyncio, 9 pytestCheckHook, 10 typeguard, 11 websockets, 12}: 13 14buildPythonPackage rec { 15 pname = "pygls"; 16 version = "1.3.1"; 17 pyproject = true; 18 19 src = fetchFromGitHub { 20 owner = "openlawlibrary"; 21 repo = "pygls"; 22 tag = "v${version}"; 23 hash = "sha256-AvrGoQ0Be1xKZhFn9XXYJpt5w+ITbDbj6NFZpaDPKao="; 24 }; 25 26 pythonRelaxDeps = [ 27 # https://github.com/openlawlibrary/pygls/pull/432 28 "lsprotocol" 29 ]; 30 31 nativeBuildInputs = [ 32 poetry-core 33 ]; 34 35 propagatedBuildInputs = [ 36 lsprotocol 37 typeguard 38 ]; 39 40 optional-dependencies = { 41 ws = [ websockets ]; 42 }; 43 44 nativeCheckInputs = [ 45 pytest-asyncio 46 pytestCheckHook 47 ]; 48 49 # Fixes hanging tests on Darwin 50 __darwinAllowLocalNetworking = true; 51 52 preCheck = lib.optionalString stdenv.hostPlatform.isDarwin '' 53 # Darwin issue: OSError: [Errno 24] Too many open files 54 ulimit -n 1024 55 ''; 56 57 pythonImportsCheck = [ "pygls" ]; 58 59 passthru.skipBulkUpdate = true; 60 61 meta = { 62 broken = lib.versionAtLeast lsprotocol.version "2024"; 63 description = "Pythonic generic implementation of the Language Server Protocol"; 64 homepage = "https://github.com/openlawlibrary/pygls"; 65 changelog = "https://github.com/openlawlibrary/pygls/blob/${version}/CHANGELOG.md"; 66 license = lib.licenses.asl20; 67 maintainers = with lib.maintainers; [ kira-bruneau ]; 68 }; 69}