2024-04-26 09:26:26 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
|
|
|
openssl,
|
|
|
|
rsa,
|
|
|
|
pyaes,
|
|
|
|
pythonOlder,
|
|
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "tulir-telethon";
|
2024-07-12 18:14:23 +00:00
|
|
|
version = "1.37.0a1";
|
2024-04-26 09:26:26 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-07-12 18:14:23 +00:00
|
|
|
sha256 = "sha256-FckMHqGaBsqvFbrEnDWqJAQG8j/euY2NooesnxV6Kcc=";
|
2024-04-26 09:26:26 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
patchPhase = ''
|
|
|
|
substituteInPlace telethon/crypto/libssl.py --replace \
|
|
|
|
"ctypes.util.find_library('ssl')" "'${lib.getLib openssl}/lib/libssl.so'"
|
|
|
|
'';
|
|
|
|
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
passthru.updateScript = [../scripts/update-python-libraries "python/tulir-telethon.nix"];
|
|
|
|
}
|