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.

8330635a72/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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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