1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, pythonOlder 5, bcrypt 6, pyopenssl 7, python-gnupg 8, requests 9, openssl 10}: 11 12buildPythonPackage rec { 13 pname = "proton-client"; 14 version = "0.7.0"; 15 disabled = pythonOlder "3.7"; 16 17 src = fetchFromGitHub { 18 owner = "ProtonMail"; 19 repo = "proton-python-client"; 20 rev = version; 21 sha256 = "sha256-98tEL3DUYtx27JcI6pPFS2iDJXS8K3yyvCU9UVrg1EM="; 22 }; 23 24 propagatedBuildInputs = [ 25 bcrypt 26 pyopenssl 27 python-gnupg 28 requests 29 ]; 30 31 buildInputs = [ openssl ]; 32 33 # This patch is supposed to indicate where to load OpenSSL library, 34 # but it is not working as intended. 35 #patchPhase = '' 36 # substituteInPlace proton/srp/_ctsrp.py --replace \ 37 # "ctypes.cdll.LoadLibrary('libssl.so.10')" "'${openssl.out}/lib/libssl.so'" 38 #''; 39 # Regarding the issue above, I'm disabling tests for now 40 doCheck = false; 41 42 pythonImportsCheck = [ "proton" ]; 43 44 meta = with lib; { 45 description = "Python Proton client module"; 46 homepage = "https://github.com/ProtonMail/proton-python-client"; 47 license = licenses.gpl3Only; 48 maintainers = with maintainers; [ wolfangaukang ]; 49 }; 50}