This repository has been archived on 2024-10-13. You can view files and clone it, but cannot push or open issues or pull requests.
nix-packages/python/tulir-telethon.nix
2023-08-31 16:26:37 +01:00

40 lines
858 B
Nix

{
lib,
buildPythonPackage,
fetchPypi,
openssl,
rsa,
pyaes,
pythonOlder,
}:
buildPythonPackage rec {
pname = "tulir-telethon";
version = "1.30.0a2";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-PkdxOdl1HM9SEC/CMOetahDzVJDg+zPP7s9NCsVdQsA=";
};
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"];
}