2020-12-25 13:55:36 +00:00
|
|
|
{ lib, buildPythonPackage, fetchPypi, openssl, async_generator, rsa, pyaes, pythonOlder }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "telethon";
|
2021-06-28 23:13:55 +00:00
|
|
|
version = "1.21.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit version;
|
|
|
|
pname = "Telethon";
|
2021-06-28 23:13:55 +00:00
|
|
|
sha256 = "sha256-mTyDfvdFrd+XKifXv7oM5Riihj0aUOBzclW3ZNI+DvI=";
|
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 ];
|
|
|
|
};
|
|
|
|
}
|