Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / proton-client / default.nix
blobc8714a741a4784b384ef1a0f169538dd9b7921d3
1 { lib
2 , stdenv
3 , buildPythonPackage
4 , fetchFromGitHub
5 , pythonOlder
6 , substituteAll
7 , bcrypt
8 , pyopenssl
9 , python-gnupg
10 , pytestCheckHook
11 , requests
12 , openssl
15 buildPythonPackage rec {
16   pname = "proton-client";
17   version = "0.7.1";
18   format = "setuptools";
19   disabled = pythonOlder "3.7";
21   src = fetchFromGitHub {
22     owner = "ProtonMail";
23     repo = "proton-python-client";
24     rev = version;
25     hash = "sha256-mhPq9O/LCu3+E1jKlaJmrI8dxbA9BIwlc34qGwoxi5g=";
26   };
28   propagatedBuildInputs = [
29     bcrypt
30     pyopenssl
31     python-gnupg
32     requests
33   ];
35   buildInputs = [ openssl ];
37   patches = [
38     # Patches library by fixing the openssl path
39     (substituteAll {
40       src = ./0001-OpenSSL-path-fix.patch;
41       openssl = openssl.out;
42       ext = stdenv.hostPlatform.extensions.sharedLibrary;
43     })
44   ];
46   nativeCheckInputs = [ pytestCheckHook ];
48   disabledTests = [
49     #ValueError: Invalid modulus
50     "test_modulus_verification"
51   ];
53   pythonImportsCheck = [ "proton" ];
55   meta = with lib; {
56     description = "Python Proton client module";
57     homepage = "https://github.com/ProtonMail/proton-python-client";
58     license = licenses.gpl3Only;
59     maintainers = with maintainers; [ wolfangaukang ];
60     platforms = platforms.linux;
61   };