1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, Logbook 5, aiofiles 6, aiohttp 7, aiohttp-socks 8, aioresponses 9, atomicwrites 10, attrs 11, cachetools 12, faker 13, future 14, git 15, h11 16, h2 17, hypothesis 18, jsonschema 19, peewee 20, poetry-core 21, pycryptodome 22, pytest-aiohttp 23, pytest-benchmark 24, pytestCheckHook 25, python-olm 26, unpaddedbase64 27}: 28 29buildPythonPackage rec { 30 pname = "matrix-nio"; 31 version = "0.20.0"; 32 format = "pyproject"; 33 34 src = fetchFromGitHub { 35 owner = "poljar"; 36 repo = "matrix-nio"; 37 rev = version; 38 hash = "sha256-7bYGMbNLAN48kfckCcNtnymvQHm9CSNsgy/soe14SII="; 39 }; 40 41 postPatch = '' 42 substituteInPlace pyproject.toml \ 43 --replace 'aiofiles = "^0.6.0"' 'aiofiles = "*"' \ 44 --replace 'h11 = "^0.12.0"' 'h11 = "*"' \ 45 --replace 'jsonschema = "^3.2.0"' 'jsonschema = "*"' \ 46 --replace 'cachetools = { version = "^4.2.1", optional = true }' 'cachetools = { version = "*", optional = true }' 47 ''; 48 49 nativeBuildInputs = [ 50 git 51 poetry-core 52 ]; 53 54 propagatedBuildInputs = [ 55 Logbook 56 aiofiles 57 aiohttp 58 aiohttp-socks 59 atomicwrites 60 attrs 61 cachetools 62 future 63 h11 64 h2 65 jsonschema 66 peewee 67 pycryptodome 68 python-olm 69 unpaddedbase64 70 ]; 71 72 checkInputs = [ 73 aioresponses 74 faker 75 hypothesis 76 pytest-aiohttp 77 pytest-benchmark 78 pytestCheckHook 79 ]; 80 81 pytestFlagsArray = [ 82 "--benchmark-disable" 83 ]; 84 85 disabledTests = [ 86 # touches network 87 "test_connect_wrapper" 88 # time dependent and flaky 89 "test_transfer_monitor_callbacks" 90 ]; 91 92 meta = with lib; { 93 homepage = "https://github.com/poljar/matrix-nio"; 94 description = "A Python Matrix client library, designed according to sans I/O principles"; 95 license = licenses.isc; 96 maintainers = with maintainers; [ tilpner emily symphorien ]; 97 }; 98}