python38Packages.telethon: Patch find_library for libssl

Telethon can use libssl to speed up encryption. The `find_library` call fails on NixOS because the environmental variables that get checked are obviously missing so we patch it with a direct path to libssl.

https://github.com/LonamiWebs/Telethon/blob/8330635a725717390e1981848737b8988a419fe1/telethon/crypto/libssl.py#L19
This commit is contained in:
Sameer Hoosen
2020-09-07 13:16:41 +02:00
committed by GitHub
parent d3b47f1556
commit 5f4b7ad06b
@@ -10,6 +10,11 @@ buildPythonPackage rec {
sha256 = "1fg12gcg6ca7rjh7m3g48m30cx4aaw5g09855nlyz2sa1kw3gfyq";
};
patchPhase = ''
substituteInPlace telethon/crypto/libssl.py --replace \
"ctypes.util.find_library('ssl')" "'${openssl.out}/lib/libssl.so'"
'';
propagatedBuildInputs = [
async_generator
rsa