2022-11-21 17:40:18 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2023-02-02 18:25:31 +00:00
|
|
|
, fetchFromGitHub
|
2022-11-21 17:40:18 +00:00
|
|
|
, pythonOlder
|
2023-02-02 18:25:31 +00:00
|
|
|
# deps
|
|
|
|
, aiohttp
|
|
|
|
, attrs
|
|
|
|
, yarl
|
|
|
|
# optional deps
|
|
|
|
, python-magic
|
|
|
|
, python-olm
|
|
|
|
, unpaddedbase64
|
|
|
|
, pycryptodome
|
|
|
|
# check deps
|
|
|
|
, pytestCheckHook
|
|
|
|
, pytest-asyncio
|
2022-11-21 17:40:18 +00:00
|
|
|
, aiosqlite
|
2023-02-02 18:25:31 +00:00
|
|
|
, sqlalchemy
|
|
|
|
, asyncpg
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "mautrix";
|
2023-04-29 16:46:19 +00:00
|
|
|
version = "0.19.12";
|
2022-11-21 17:40:18 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.8";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mautrix";
|
|
|
|
repo = "python";
|
2023-03-24 00:07:29 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-04-29 16:46:19 +00:00
|
|
|
hash = "sha256-XG2uAG5sKGGtnCTQJ2gsAm7jxtvMg+1MXPJLkb+2cPQ=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
aiohttp
|
2023-02-02 18:25:31 +00:00
|
|
|
attrs
|
|
|
|
yarl
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
passthru.optional-dependencies = {
|
|
|
|
detect_mimetype = [
|
|
|
|
python-magic
|
|
|
|
];
|
|
|
|
encryption = [
|
|
|
|
python-olm
|
|
|
|
unpaddedbase64
|
|
|
|
pycryptodome
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
checkInputs = [
|
|
|
|
pytest-asyncio
|
|
|
|
aiosqlite
|
|
|
|
sqlalchemy
|
|
|
|
asyncpg
|
|
|
|
] ++ passthru.optional-dependencies.encryption;
|
|
|
|
|
|
|
|
SQLALCHEMY_SILENCE_UBER_WARNING = 1;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
# sqlalchemy 2 unsupported
|
|
|
|
"mautrix/client/state_store/tests/store_test.py"
|
|
|
|
];
|
|
|
|
|
2022-11-21 17:40:18 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"mautrix"
|
|
|
|
];
|
2021-02-13 14:23:35 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
2022-11-21 17:40:18 +00:00
|
|
|
description = "Asyncio Matrix framework";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/tulir/mautrix-python";
|
2022-11-21 17:40:18 +00:00
|
|
|
changelog = "https://github.com/mautrix/python/releases/tag/v${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mpl20;
|
2023-02-02 18:25:31 +00:00
|
|
|
maintainers = with maintainers; [ nyanloutre ma27 sumnerevans nickcao ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|