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.18.7";
32 format = "pyproject";
33
34 src = fetchFromGitHub {
35 owner = "poljar";
36 repo = "matrix-nio";
37 rev = version;
38 hash = "sha256-eti9kvfv3y7m+mJzcxftyn8OyVSd2Ehqd3eU2ezMV5Q=";
39 };
40
41 postPatch = ''
42 substituteInPlace pyproject.toml \
43 --replace 'aiofiles = "^0.6.0"' 'aiofiles = "*"'
44 '';
45
46 nativeBuildInputs = [
47 git
48 poetry-core
49 pytestCheckHook
50 ];
51
52 propagatedBuildInputs = [
53 Logbook
54 aiofiles
55 aiohttp
56 aiohttp-socks
57 atomicwrites
58 attrs
59 cachetools
60 future
61 h11
62 h2
63 jsonschema
64 peewee
65 pycryptodome
66 python-olm
67 unpaddedbase64
68 ];
69
70 checkInputs = [
71 aioresponses
72 faker
73 hypothesis
74 pytest-aiohttp
75 pytest-benchmark
76 ];
77
78 disabledTests = [
79 # touches network
80 "test_connect_wrapper"
81 # time dependent and flaky
82 "test_transfer_monitor_callbacks"
83 ];
84
85 meta = with lib; {
86 homepage = "https://github.com/poljar/matrix-nio";
87 description = "A Python Matrix client library, designed according to sans I/O principles";
88 license = licenses.isc;
89 maintainers = with maintainers; [ tilpner emily symphorien ];
90 };
91}