2022-07-28 12:10:27 +03:00
|
|
|
{ lib
|
|
|
|
, python3
|
2023-05-25 19:06:38 +03:00
|
|
|
, fetchPypi
|
2022-07-28 12:10:27 +03:00
|
|
|
, fetchFromGitHub
|
2021-08-07 13:38:46 +03:00
|
|
|
, withE2BE ? true
|
|
|
|
}:
|
2019-01-29 16:46:44 +03:00
|
|
|
|
2020-08-01 21:43:24 +03:00
|
|
|
let
|
2021-06-21 22:37:06 +03:00
|
|
|
python = python3.override {
|
|
|
|
packageOverrides = self: super: {
|
2021-11-13 18:00:17 +03:00
|
|
|
tulir-telethon = self.telethon.overridePythonAttrs (oldAttrs: rec {
|
2023-05-28 10:20:20 +03:00
|
|
|
version = "1.28.0a9";
|
2021-11-13 18:00:17 +03:00
|
|
|
pname = "tulir-telethon";
|
2023-05-25 19:06:38 +03:00
|
|
|
src = fetchPypi {
|
2021-11-13 18:00:17 +03:00
|
|
|
inherit pname version;
|
2023-05-28 10:20:20 +03:00
|
|
|
hash = "sha256-7lRoJYhy9c8RxJTW1/7SrNtA36mwIrPcyRMPVNhWJTk=";
|
2021-11-13 18:00:17 +03:00
|
|
|
};
|
2022-09-25 17:03:09 +03:00
|
|
|
doCheck = false;
|
2021-11-13 18:00:17 +03:00
|
|
|
});
|
2021-06-21 22:37:06 +03:00
|
|
|
};
|
|
|
|
};
|
2023-01-14 15:11:14 +03:00
|
|
|
in
|
2023-02-28 14:12:16 +03:00
|
|
|
python.pkgs.buildPythonPackage rec {
|
2019-01-29 16:46:44 +03:00
|
|
|
pname = "mautrix-telegram";
|
2023-05-28 10:20:20 +03:00
|
|
|
version = "0.14.0";
|
2022-04-17 15:54:33 +03:00
|
|
|
disabled = python.pythonOlder "3.8";
|
2019-01-29 16:46:44 +03:00
|
|
|
|
2020-07-28 12:56:05 +03:00
|
|
|
src = fetchFromGitHub {
|
2021-11-17 15:23:31 +03:00
|
|
|
owner = "mautrix";
|
|
|
|
repo = "telegram";
|
2023-02-28 14:12:16 +03:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-05-28 10:20:20 +03:00
|
|
|
hash = "sha256-OPWa3jqaLnV7M1Q77N10A3HT65dNon6RWE5mbQRvjEs=";
|
2019-01-29 16:46:44 +03:00
|
|
|
};
|
|
|
|
|
2023-01-14 15:11:14 +03:00
|
|
|
format = "setuptools";
|
|
|
|
|
2021-12-29 07:40:25 +03:00
|
|
|
patches = [ ./0001-Re-add-entrypoint.patch ];
|
2021-08-13 00:24:30 +03:00
|
|
|
|
2021-08-07 13:38:46 +03:00
|
|
|
propagatedBuildInputs = with python.pkgs; ([
|
2021-11-03 13:10:50 +03:00
|
|
|
ruamel-yaml
|
2022-05-07 02:18:35 +03:00
|
|
|
python-magic
|
2023-02-19 19:35:34 +03:00
|
|
|
commonmark
|
2022-07-28 12:10:27 +03:00
|
|
|
aiohttp
|
|
|
|
yarl
|
|
|
|
mautrix
|
2021-11-13 18:00:17 +03:00
|
|
|
tulir-telethon
|
2022-07-28 12:10:27 +03:00
|
|
|
asyncpg
|
2023-02-19 20:28:43 +03:00
|
|
|
mako
|
2023-03-16 09:35:13 +03:00
|
|
|
setuptools
|
2023-01-14 15:11:14 +03:00
|
|
|
# speedups
|
2022-07-28 12:10:27 +03:00
|
|
|
cryptg
|
|
|
|
aiodns
|
|
|
|
brotli
|
2023-01-14 15:11:14 +03:00
|
|
|
# qr_login
|
2019-02-20 16:07:37 +03:00
|
|
|
pillow
|
2022-07-28 12:10:27 +03:00
|
|
|
qrcode
|
2023-01-14 15:11:14 +03:00
|
|
|
# formattednumbers
|
2022-07-28 12:10:27 +03:00
|
|
|
phonenumbers
|
2023-01-14 15:11:14 +03:00
|
|
|
# metrics
|
2021-10-05 13:06:16 +03:00
|
|
|
prometheus-client
|
2023-01-14 15:11:14 +03:00
|
|
|
# sqlite
|
2022-07-28 12:10:27 +03:00
|
|
|
aiosqlite
|
2021-08-07 13:38:46 +03:00
|
|
|
] ++ lib.optionals withE2BE [
|
2023-01-14 15:11:14 +03:00
|
|
|
# e2be
|
2021-08-07 13:38:46 +03:00
|
|
|
python-olm
|
|
|
|
pycryptodome
|
|
|
|
unpaddedbase64
|
2022-07-28 12:10:27 +03:00
|
|
|
]);
|
2019-01-29 16:46:44 +03:00
|
|
|
|
2022-07-28 12:10:27 +03:00
|
|
|
# has no tests
|
2020-11-29 11:14:23 +03:00
|
|
|
doCheck = false;
|
2019-01-29 16:46:44 +03:00
|
|
|
|
|
|
|
meta = with lib; {
|
2021-11-17 15:23:31 +03:00
|
|
|
homepage = "https://github.com/mautrix/telegram";
|
2019-01-29 16:46:44 +03:00
|
|
|
description = "A Matrix-Telegram hybrid puppeting/relaybot bridge";
|
|
|
|
license = licenses.agpl3Plus;
|
2019-12-30 01:37:31 +03:00
|
|
|
platforms = platforms.linux;
|
2022-07-28 12:10:27 +03:00
|
|
|
maintainers = with maintainers; [ nyanloutre ma27 nickcao ];
|
2019-01-29 16:46:44 +03:00
|
|
|
};
|
|
|
|
}
|