Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / matrix-nio / default.nix
blob38daf62a635bf0007eff74cc0e1b5c3d4cbe64c7
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
5 # build-system
6 , poetry-core
8 # dependencies
9 , aiofiles
10 , aiohttp
11 , aiohttp-socks
12 , h11
13 , h2
14 , jsonschema
15 , pycryptodome
16 , unpaddedbase64
18 # optional-dependencies
19 , atomicwrites
20 , cachetools
21 , peewee
22 , python-olm
24 # tests
25 , aioresponses
26 , faker
27 , hpack
28 , hyperframe
29 , hypothesis
30 , pytest-aiohttp
31 , pytest-benchmark
32 , pytestCheckHook
34 # passthru tests
35 , nixosTests
36 , opsdroid
37 , pantalaimon
38 , weechatScripts
39 , zulip
42 buildPythonPackage rec {
43   pname = "matrix-nio";
44   version = "0.24.0";
45   format = "pyproject";
47   src = fetchFromGitHub {
48     owner = "poljar";
49     repo = "matrix-nio";
50     rev = version;
51     hash = "sha256-XlswVHLvKOi1qr+I7Mbm4IBjn1DG7glgDsNY48NA5Ew=";
52   };
54   nativeBuildInputs = [
55     poetry-core
56   ];
58   propagatedBuildInputs = [
59     aiofiles
60     aiohttp
61     aiohttp-socks
62     h11
63     h2
64     jsonschema
65     pycryptodome
66     unpaddedbase64
67   ];
69   passthru.optional-dependencies = {
70     e2e = [
71       atomicwrites
72       cachetools
73       python-olm
74       peewee
75     ];
76   };
78   nativeCheckInputs = [
79     aioresponses
80     faker
81     hpack
82     hyperframe
83     hypothesis
84     pytest-aiohttp
85     pytest-benchmark
86     pytestCheckHook
87   ] ++ passthru.optional-dependencies.e2e;
89   pytestFlagsArray = [
90     "--benchmark-disable"
91   ];
93   disabledTests = [
94     # touches network
95     "test_connect_wrapper"
96     # time dependent and flaky
97     "test_transfer_monitor_callbacks"
98   ];
100   passthru.tests = {
101     inherit (nixosTests)
102       dendrite
103       matrix-appservice-irc
104       matrix-conduit
105       mjolnir
106     ;
107     inherit (weechatScripts)
108       weechat-matrix
109     ;
110     inherit
111       opsdroid
112       pantalaimon
113       zulip
114     ;
115   };
117   meta = with lib; {
118     homepage = "https://github.com/poljar/matrix-nio";
119     changelog = "https://github.com/poljar/matrix-nio/blob/${version}/CHANGELOG.md";
120     description = "A Python Matrix client library, designed according to sans I/O principles";
121     license = licenses.isc;
122     maintainers = with maintainers; [ tilpner emily symphorien ];
123   };