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