2021-12-06 16:07:01 +00:00
|
|
|
{ lib, buildPythonPackage, fetchPypi, openssl, rsa, pyaes, pythonOlder }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "telethon";
|
2021-12-19 01:06:50 +00:00
|
|
|
version = "1.24.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit version;
|
|
|
|
pname = "Telethon";
|
2021-12-19 01:06:50 +00:00
|
|
|
sha256 = "818cb61281ed3f75ba4da9b68cb69486bed9474d2db4e0aa16e482053117452c";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-12-25 13:55:36 +00:00
|
|
|
patchPhase = ''
|
|
|
|
substituteInPlace telethon/crypto/libssl.py --replace \
|
|
|
|
"ctypes.util.find_library('ssl')" "'${openssl.out}/lib/libssl.so'"
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
rsa
|
|
|
|
pyaes
|
|
|
|
];
|
|
|
|
|
|
|
|
# No tests available
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.5";
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/LonamiWebs/Telethon";
|
|
|
|
description = "Full-featured Telegram client library for Python 3";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ nyanloutre ];
|
|
|
|
};
|
|
|
|
}
|