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
|
|
|
, asyncpg
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "mautrix";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "0.20.2";
|
2022-11-21 17:40:18 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
disabled = pythonOlder "3.9";
|
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-10-09 19:29:22 +00:00
|
|
|
hash = "sha256-c6NSDFQGKtT8Otw+ivNUZ2+Qm/LEDGpZNs3FrYq+N1A=";
|
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
|
|
|
|
asyncpg
|
|
|
|
] ++ passthru.optional-dependencies.encryption;
|
|
|
|
|
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
|
|
|
};
|
|
|
|
}
|