2020-02-10 01:26:32 +01:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, git
|
2021-05-06 19:53:39 +02:00
|
|
|
, poetry-core
|
2020-02-10 01:26:32 +01:00
|
|
|
, attrs
|
|
|
|
, future
|
|
|
|
, aiohttp
|
2021-05-06 19:53:39 +02:00
|
|
|
, aiohttp-socks
|
2020-02-10 01:26:32 +01:00
|
|
|
, aiofiles
|
|
|
|
, h11
|
|
|
|
, h2
|
|
|
|
, Logbook
|
|
|
|
, jsonschema
|
|
|
|
, unpaddedbase64
|
|
|
|
, pycryptodome
|
|
|
|
, python-olm
|
|
|
|
, peewee
|
|
|
|
, cachetools
|
|
|
|
, atomicwrites
|
2021-03-20 18:54:15 +01:00
|
|
|
, pytestCheckHook
|
|
|
|
, faker
|
|
|
|
, aioresponses
|
|
|
|
, hypothesis
|
|
|
|
, pytest-aiohttp
|
|
|
|
, pytest-benchmark
|
2020-02-10 01:26:32 +01:00
|
|
|
}:
|
2019-11-15 15:20:03 +01:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2020-05-10 14:00:00 +02:00
|
|
|
pname = "matrix-nio";
|
2021-06-28 18:49:56 +02:00
|
|
|
version = "0.18.3";
|
2021-05-06 19:53:39 +02:00
|
|
|
format = "pyproject";
|
2019-11-15 15:20:03 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "poljar";
|
|
|
|
repo = "matrix-nio";
|
|
|
|
rev = version;
|
2021-06-28 18:49:56 +02:00
|
|
|
sha256 = "1sjdqzlk8vgv0748ayhnadw1bip3i4bfga4knb94cfkd3s4rgb39";
|
2019-11-15 15:20:03 +01:00
|
|
|
};
|
|
|
|
|
2021-06-20 19:53:18 +02:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace 'aiofiles = "^0.6.0"' 'aiofiles = "*"'
|
|
|
|
'';
|
|
|
|
|
2019-11-15 15:20:03 +01:00
|
|
|
nativeBuildInputs = [
|
|
|
|
git
|
2021-05-06 19:53:39 +02:00
|
|
|
poetry-core
|
2021-03-20 18:54:15 +01:00
|
|
|
pytestCheckHook
|
2019-11-15 15:20:03 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
attrs
|
|
|
|
future
|
2020-02-10 01:26:32 +01:00
|
|
|
aiohttp
|
2021-05-06 19:53:39 +02:00
|
|
|
aiohttp-socks
|
2020-02-10 01:26:32 +01:00
|
|
|
aiofiles
|
2019-11-15 15:20:03 +01:00
|
|
|
h11
|
|
|
|
h2
|
|
|
|
Logbook
|
|
|
|
jsonschema
|
|
|
|
unpaddedbase64
|
2020-02-10 01:26:32 +01:00
|
|
|
pycryptodome
|
|
|
|
python-olm
|
|
|
|
peewee
|
2019-12-01 03:36:35 +01:00
|
|
|
cachetools
|
2020-02-10 01:26:32 +01:00
|
|
|
atomicwrites
|
2019-11-15 15:20:03 +01:00
|
|
|
];
|
|
|
|
|
2021-03-20 18:54:15 +01:00
|
|
|
checkInputs = [
|
|
|
|
faker
|
|
|
|
aioresponses
|
|
|
|
hypothesis
|
|
|
|
pytest-aiohttp
|
|
|
|
pytest-benchmark
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# touches network
|
|
|
|
"test_connect_wrapper"
|
|
|
|
# time dependent and flaky
|
|
|
|
"test_transfer_monitor_callbacks"
|
|
|
|
];
|
2019-11-15 15:20:03 +01:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A Python Matrix client library, designed according to sans I/O principles";
|
|
|
|
homepage = "https://github.com/poljar/matrix-nio";
|
|
|
|
license = licenses.isc;
|
2020-04-21 14:00:00 +02:00
|
|
|
maintainers = with maintainers; [ tilpner emily symphorien ];
|
2019-11-15 15:20:03 +01:00
|
|
|
};
|
|
|
|
}
|