nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at r-updates 60 lines 1.2 kB view raw
1{ 2 lib, 3 stdenv, 4 buildPythonPackage, 5 fetchFromGitHub, 6 replaceVars, 7 bcrypt, 8 pyopenssl, 9 python-gnupg, 10 pytestCheckHook, 11 requests, 12 openssl, 13}: 14 15buildPythonPackage rec { 16 pname = "proton-client"; 17 version = "0.7.1"; 18 format = "setuptools"; 19 20 src = fetchFromGitHub { 21 owner = "ProtonMail"; 22 repo = "proton-python-client"; 23 rev = version; 24 hash = "sha256-mhPq9O/LCu3+E1jKlaJmrI8dxbA9BIwlc34qGwoxi5g="; 25 }; 26 27 propagatedBuildInputs = [ 28 bcrypt 29 pyopenssl 30 python-gnupg 31 requests 32 ]; 33 34 buildInputs = [ openssl ]; 35 36 patches = [ 37 # Patches library by fixing the openssl path 38 (replaceVars ./0001-OpenSSL-path-fix.patch { 39 openssl = openssl.out; 40 ext = stdenv.hostPlatform.extensions.sharedLibrary; 41 }) 42 ]; 43 44 nativeCheckInputs = [ pytestCheckHook ]; 45 46 disabledTests = [ 47 #ValueError: Invalid modulus 48 "test_modulus_verification" 49 ]; 50 51 pythonImportsCheck = [ "proton" ]; 52 53 meta = { 54 description = "Python Proton client module"; 55 homepage = "https://github.com/ProtonMail/proton-python-client"; 56 license = lib.licenses.gpl3Only; 57 maintainers = [ ]; 58 platforms = lib.platforms.linux; 59 }; 60}