2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pythonOlder,
|
2023-02-02 18:25:31 +00:00
|
|
|
# deps
|
2024-06-05 15:53:02 +00:00
|
|
|
aiohttp,
|
|
|
|
attrs,
|
|
|
|
yarl,
|
2023-02-02 18:25:31 +00:00
|
|
|
# optional deps
|
2024-06-05 15:53:02 +00:00
|
|
|
python-magic,
|
|
|
|
python-olm,
|
|
|
|
unpaddedbase64,
|
|
|
|
pycryptodome,
|
2023-02-02 18:25:31 +00:00
|
|
|
# check deps
|
2024-06-05 15:53:02 +00:00
|
|
|
pytestCheckHook,
|
|
|
|
pytest-asyncio,
|
|
|
|
aiosqlite,
|
|
|
|
asyncpg,
|
|
|
|
ruamel-yaml,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "mautrix";
|
2024-01-13 08:15:51 +00:00
|
|
|
version = "0.20.4";
|
2022-11-21 17:40:18 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
disabled = pythonOlder "3.10";
|
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}";
|
2024-01-13 08:15:51 +00:00
|
|
|
hash = "sha256-A9d/r4Caeo4tO82/MMXgU5xKvXRDnK0iQUm8AFhDPLM=";
|
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 = {
|
2024-06-05 15:53:02 +00:00
|
|
|
detect_mimetype = [ python-magic ];
|
2023-02-02 18:25:31 +00:00
|
|
|
encryption = [
|
|
|
|
python-olm
|
|
|
|
unpaddedbase64
|
|
|
|
pycryptodome
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
pytest-asyncio
|
|
|
|
aiosqlite
|
|
|
|
asyncpg
|
2024-01-13 08:15:51 +00:00
|
|
|
ruamel-yaml
|
2023-02-02 18:25:31 +00:00
|
|
|
] ++ passthru.optional-dependencies.encryption;
|
|
|
|
|
2024-06-05 15:53:02 +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;
|
2024-06-05 15:53:02 +00:00
|
|
|
maintainers = with maintainers; [
|
|
|
|
nyanloutre
|
|
|
|
ma27
|
|
|
|
sumnerevans
|
|
|
|
nickcao
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|