Merge: matrix-synapse: 1.122.0 -> 1.123.0 (#378018)
[NixPkgs.git] / pkgs / development / python-modules / proton-vpn-api-core / default.nix
blobdad65babe69903a9c61f3cbb38632638258e45f4
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
5   cryptography,
6   setuptools,
7   jinja2,
8   proton-core,
9   pynacl,
10   aiohttp,
11   pyopenssl,
12   pytest-asyncio,
13   requests,
14   sentry-sdk,
15   distro,
16   pytestCheckHook,
17   pytest-cov-stub,
20 buildPythonPackage rec {
21   pname = "proton-vpn-api-core";
22   version = "0.39.0";
23   pyproject = true;
25   src = fetchFromGitHub {
26     owner = "ProtonVPN";
27     repo = "python-proton-vpn-api-core";
28     rev = "v${version}";
29     hash = "sha256-1GmLrX3FLwPoj+RGzPxzw1O7Q7r5M1coJelPhn2CTLI=";
30   };
32   build-system = [
33     setuptools
34   ];
36   dependencies = [
37     cryptography
38     distro
39     jinja2
40     pynacl
41     proton-core
42     sentry-sdk
43   ];
45   pythonImportsCheck = [
46     "proton.vpn.core"
47     "proton.vpn.connection"
48     "proton.vpn.killswitch.interface"
49     "proton.vpn.logging"
50     "proton.vpn.session"
51   ];
53   nativeCheckInputs = [
54     aiohttp
55     pyopenssl
56     pytest-asyncio
57     requests
58     pytestCheckHook
59     pytest-cov-stub
60   ];
62   postInstall = ''
63     # Needed for Permission denied: '/homeless-shelter'
64     export HOME=$(mktemp -d)
65   '';
67   disabledTests = [
68     # Permission denied: '/run'
69     "test_ensure_configuration_file_is_created"
70     "test_ovpnconfig_with_certificate"
71     "test_ovpnconfig_with_settings"
72     "test_wireguard_config_content_generation"
73     "test_wireguard_with_non_certificate"
74     "test_ensure_generate_is_returning_expected_content"
75     "test_ensure_same_configuration_file_in_case_of_duplicate"
76     "test_ensure_configuration_file_is_deleted"
77   ];
79   meta = {
80     description = "Acts as a facade to the other Proton VPN components, exposing a uniform API to the available Proton VPN services";
81     homepage = "https://github.com/ProtonVPN/python-proton-vpn-api-core";
82     license = lib.licenses.gpl3Only;
83     platforms = lib.platforms.linux;
84     maintainers = with lib.maintainers; [
85       sebtm
86       rapiteanu
87     ];
88   };