2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
2024-02-29 20:09:43 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
# build-system
|
|
|
|
poetry-core,
|
2024-02-29 20:09:43 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
# dependencies
|
|
|
|
aiofiles,
|
|
|
|
aiohttp,
|
|
|
|
aiohttp-socks,
|
|
|
|
h11,
|
|
|
|
h2,
|
|
|
|
jsonschema,
|
|
|
|
pycryptodome,
|
|
|
|
unpaddedbase64,
|
2024-02-29 20:09:43 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
# optional-dependencies
|
|
|
|
atomicwrites,
|
|
|
|
cachetools,
|
|
|
|
peewee,
|
|
|
|
python-olm,
|
2024-02-29 20:09:43 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
# tests
|
|
|
|
aioresponses,
|
|
|
|
faker,
|
|
|
|
hpack,
|
|
|
|
hyperframe,
|
|
|
|
hypothesis,
|
|
|
|
pytest-aiohttp,
|
|
|
|
pytest-benchmark,
|
|
|
|
pytestCheckHook,
|
2024-02-29 20:09:43 +00:00
|
|
|
|
2024-06-05 15:53:02 +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
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ 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
|
|
|
|
2024-06-05 15:53:02 +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
|
2024-06-05 15:53:02 +00:00
|
|
|
;
|
|
|
|
inherit (weechatScripts) weechat-matrix;
|
|
|
|
inherit opsdroid pantalaimon zulip;
|
2024-02-29 20:09:43 +00:00
|
|
|
};
|
|
|
|
|
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";
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Python Matrix client library, designed according to sans I/O principles";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.isc;
|
2024-06-05 15:53:02 +00:00
|
|
|
maintainers = with maintainers; [
|
|
|
|
tilpner
|
|
|
|
symphorien
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|