2021-12-06 16:07:01 +00:00
|
|
|
{ lib
|
2022-04-27 09:35:20 +00:00
|
|
|
, stdenv
|
2021-12-06 16:07:01 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pythonOlder
|
2022-04-27 09:35:20 +00:00
|
|
|
, substituteAll
|
2021-12-06 16:07:01 +00:00
|
|
|
, bcrypt
|
|
|
|
, pyopenssl
|
|
|
|
, python-gnupg
|
2022-04-27 09:35:20 +00:00
|
|
|
, pytestCheckHook
|
2021-12-06 16:07:01 +00:00
|
|
|
, requests
|
|
|
|
, openssl
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "proton-client";
|
2022-01-22 01:22:15 +00:00
|
|
|
version = "0.7.1";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2021-12-06 16:07:01 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ProtonMail";
|
|
|
|
repo = "proton-python-client";
|
|
|
|
rev = version;
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-mhPq9O/LCu3+E1jKlaJmrI8dxbA9BIwlc34qGwoxi5g=";
|
2021-12-06 16:07:01 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
bcrypt
|
|
|
|
pyopenssl
|
|
|
|
python-gnupg
|
|
|
|
requests
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [ openssl ];
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
patches = [
|
|
|
|
# Patches library by fixing the openssl path
|
|
|
|
(substituteAll {
|
|
|
|
src = ./0001-OpenSSL-path-fix.patch;
|
|
|
|
openssl = openssl.out;
|
|
|
|
ext = stdenv.hostPlatform.extensions.sharedLibrary;
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2022-04-27 09:35:20 +00:00
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
#ValueError: Invalid modulus
|
|
|
|
"test_modulus_verification"
|
|
|
|
];
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
pythonImportsCheck = [ "proton" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python Proton client module";
|
|
|
|
homepage = "https://github.com/ProtonMail/proton-python-client";
|
|
|
|
license = licenses.gpl3Only;
|
|
|
|
maintainers = with maintainers; [ wolfangaukang ];
|
2022-05-18 14:49:53 +00:00
|
|
|
platforms = platforms.linux;
|
2021-12-06 16:07:01 +00:00
|
|
|
};
|
|
|
|
}
|