2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2021-10-14 00:43:12 +00:00
|
|
|
, Logbook
|
|
|
|
, 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
|
|
|
|
, 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";
|
2022-10-06 18:32:54 +00:00
|
|
|
version = "0.20.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;
|
2022-10-06 18:32:54 +00:00
|
|
|
hash = "sha256-7bYGMbNLAN48kfckCcNtnymvQHm9CSNsgy/soe14SII=";
|
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 = "*"' \
|
2022-02-10 20:34:41 +00:00
|
|
|
--replace 'jsonschema = "^3.2.0"' 'jsonschema = "*"' \
|
2022-02-20 05:27:41 +00:00
|
|
|
--replace 'cachetools = { version = "^4.2.1", optional = true }' 'cachetools = { version = "*", optional = true }'
|
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
|
|
|
Logbook
|
|
|
|
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
|
|
|
atomicwrites
|
|
|
|
attrs
|
|
|
|
cachetools
|
|
|
|
future
|
2020-04-24 23:36:52 +00:00
|
|
|
h11
|
|
|
|
h2
|
|
|
|
jsonschema
|
2021-10-14 00:43:12 +00:00
|
|
|
peewee
|
2020-04-24 23:36:52 +00:00
|
|
|
pycryptodome
|
|
|
|
python-olm
|
2021-10-14 00:43:12 +00:00
|
|
|
unpaddedbase64
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
checkInputs = [
|
|
|
|
aioresponses
|
2021-10-14 00:43:12 +00:00
|
|
|
faker
|
2021-05-20 23:08:51 +00:00
|
|
|
hypothesis
|
|
|
|
pytest-aiohttp
|
|
|
|
pytest-benchmark
|
2022-01-03 16:56:52 +00:00
|
|
|
pytestCheckHook
|
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";
|
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 ];
|
|
|
|
};
|
|
|
|
}
|