2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2023-03-15 16:39:30 +00:00
|
|
|
, logbook
|
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
|
2021-10-14 00:43:12 +00:00
|
|
|
, aioresponses
|
|
|
|
, atomicwrites
|
|
|
|
, attrs
|
|
|
|
, cachetools
|
|
|
|
, faker
|
|
|
|
, future
|
|
|
|
, git
|
2020-04-24 23:36:52 +00:00
|
|
|
, h11
|
|
|
|
, h2
|
2021-10-14 00:43:12 +00:00
|
|
|
, hypothesis
|
2020-04-24 23:36:52 +00:00
|
|
|
, jsonschema
|
|
|
|
, peewee
|
2021-10-14 00:43:12 +00:00
|
|
|
, poetry-core
|
2023-01-20 10:41:00 +00:00
|
|
|
, py
|
2021-10-14 00:43:12 +00:00
|
|
|
, pycryptodome
|
2021-05-20 23:08:51 +00:00
|
|
|
, pytest-aiohttp
|
|
|
|
, pytest-benchmark
|
2021-10-14 00:43:12 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, python-olm
|
|
|
|
, unpaddedbase64
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2020-06-18 07:06:33 +00:00
|
|
|
pname = "matrix-nio";
|
2023-02-02 18:25:31 +00:00
|
|
|
version = "0.20.1";
|
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;
|
2023-02-02 18:25:31 +00:00
|
|
|
hash = "sha256-6oMOfyl8yR8FMprPYD831eiXh9g/bqslvxDmVcrNK80=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
2022-02-10 20:34:41 +00:00
|
|
|
--replace 'aiofiles = "^0.6.0"' 'aiofiles = "*"' \
|
2022-04-15 01:41:22 +00:00
|
|
|
--replace 'h11 = "^0.12.0"' 'h11 = "*"' \
|
2023-03-15 16:39:30 +00:00
|
|
|
--replace 'cachetools = { version = "^4.2.1", optional = true }' 'cachetools = { version = "*", optional = true }' \
|
|
|
|
--replace 'aiohttp-socks = "^0.7.0"' 'aiohttp-socks = "*"'
|
2021-06-28 23:13:55 +00:00
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
git
|
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
|
2021-10-14 00:43:12 +00:00
|
|
|
attrs
|
|
|
|
future
|
2020-04-24 23:36:52 +00:00
|
|
|
h11
|
|
|
|
h2
|
|
|
|
jsonschema
|
2023-03-15 16:39:30 +00:00
|
|
|
logbook
|
2020-04-24 23:36:52 +00:00
|
|
|
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
|
2021-05-20 23:08:51 +00:00
|
|
|
hypothesis
|
2023-01-20 10:41:00 +00:00
|
|
|
py
|
2021-05-20 23:08:51 +00:00
|
|
|
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
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|