2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2024-02-29 20:09:43 +00:00
|
|
|
|
|
|
|
# build-system
|
|
|
|
, poetry-core
|
|
|
|
|
|
|
|
# dependencies
|
2021-10-14 00:43:12 +00:00
|
|
|
, aiofiles
|
2020-04-24 23:36:52 +00:00
|
|
|
, aiohttp
|
2021-05-20 23:08:51 +00:00
|
|
|
, aiohttp-socks
|
2020-04-24 23:36:52 +00:00
|
|
|
, h11
|
|
|
|
, h2
|
|
|
|
, jsonschema
|
2021-10-14 00:43:12 +00:00
|
|
|
, pycryptodome
|
2024-02-29 20:09:43 +00:00
|
|
|
, unpaddedbase64
|
|
|
|
|
|
|
|
# optional-dependencies
|
|
|
|
, atomicwrites
|
|
|
|
, cachetools
|
|
|
|
, peewee
|
|
|
|
, python-olm
|
|
|
|
|
|
|
|
# tests
|
|
|
|
, aioresponses
|
|
|
|
, faker
|
|
|
|
, hpack
|
|
|
|
, hyperframe
|
|
|
|
, hypothesis
|
2021-05-20 23:08:51 +00:00
|
|
|
, pytest-aiohttp
|
|
|
|
, pytest-benchmark
|
2021-10-14 00:43:12 +00:00
|
|
|
, pytestCheckHook
|
2024-02-29 20:09:43 +00:00
|
|
|
|
|
|
|
# passthru tests
|
|
|
|
, nixosTests
|
|
|
|
, opsdroid
|
|
|
|
, pantalaimon
|
|
|
|
, weechatScripts
|
|
|
|
, zulip
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2020-06-18 07:06:33 +00:00
|
|
|
pname = "matrix-nio";
|
2024-02-29 20:09:43 +00:00
|
|
|
version = "0.24.0";
|
2021-05-20 23:08:51 +00:00
|
|
|
format = "pyproject";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "poljar";
|
|
|
|
repo = "matrix-nio";
|
|
|
|
rev = version;
|
2024-02-29 20:09:43 +00:00
|
|
|
hash = "sha256-XlswVHLvKOi1qr+I7Mbm4IBjn1DG7glgDsNY48NA5Ew=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2021-05-20 23:08:51 +00:00
|
|
|
poetry-core
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2021-10-14 00:43:12 +00:00
|
|
|
aiofiles
|
2020-04-24 23:36:52 +00:00
|
|
|
aiohttp
|
2021-05-20 23:08:51 +00:00
|
|
|
aiohttp-socks
|
2020-04-24 23:36:52 +00:00
|
|
|
h11
|
|
|
|
h2
|
|
|
|
jsonschema
|
|
|
|
pycryptodome
|
2021-10-14 00:43:12 +00:00
|
|
|
unpaddedbase64
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
passthru.optional-dependencies = {
|
|
|
|
e2e = [
|
|
|
|
atomicwrites
|
|
|
|
cachetools
|
|
|
|
python-olm
|
|
|
|
peewee
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-05-20 23:08:51 +00:00
|
|
|
aioresponses
|
2021-10-14 00:43:12 +00:00
|
|
|
faker
|
2024-02-29 20:09:43 +00:00
|
|
|
hpack
|
|
|
|
hyperframe
|
2021-05-20 23:08:51 +00:00
|
|
|
hypothesis
|
|
|
|
pytest-aiohttp
|
|
|
|
pytest-benchmark
|
2022-01-03 16:56:52 +00:00
|
|
|
pytestCheckHook
|
2023-03-15 16:39:30 +00:00
|
|
|
] ++ passthru.optional-dependencies.e2e;
|
2021-05-20 23:08:51 +00:00
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
pytestFlagsArray = [
|
|
|
|
"--benchmark-disable"
|
|
|
|
];
|
2022-01-03 16:56:52 +00:00
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
disabledTests = [
|
|
|
|
# touches network
|
|
|
|
"test_connect_wrapper"
|
|
|
|
# time dependent and flaky
|
|
|
|
"test_transfer_monitor_callbacks"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
passthru.tests = {
|
|
|
|
inherit (nixosTests)
|
|
|
|
dendrite
|
|
|
|
matrix-appservice-irc
|
|
|
|
matrix-conduit
|
|
|
|
mjolnir
|
|
|
|
;
|
|
|
|
inherit (weechatScripts)
|
|
|
|
weechat-matrix
|
|
|
|
;
|
|
|
|
inherit
|
|
|
|
opsdroid
|
|
|
|
pantalaimon
|
|
|
|
zulip
|
|
|
|
;
|
|
|
|
};
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/poljar/matrix-nio";
|
2023-03-15 16:39:30 +00:00
|
|
|
changelog = "https://github.com/poljar/matrix-nio/blob/${version}/CHANGELOG.md";
|
2021-10-14 00:43:12 +00:00
|
|
|
description = "A Python Matrix client library, designed according to sans I/O principles";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.isc;
|
|
|
|
maintainers = with maintainers; [ tilpner emily symphorien ];
|
|
|
|
};
|
|
|
|
}
|