blob: 2257130c20e0e596853c7ccd102a157294a362d5 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
{ lib
, buildPythonPackage
, fetchFromGitHub
, setuptools
, proton-core
, proton-vpn-killswitch
, proton-vpn-logger
, jinja2
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "proton-vpn-connection";
version = "0.11.3";
pyproject = true;
src = fetchFromGitHub {
owner = "ProtonVPN";
repo = "python-proton-vpn-connection";
rev = "refs/tags/v${version}";
hash = "sha256-RuLnc/olI8S09WFG126N2xZgW4gf+DDpRstcelqMhs4=";
};
nativeBuildInputs = [
setuptools
];
propagatedBuildInputs = [
jinja2
proton-core
proton-vpn-killswitch
proton-vpn-logger
];
postPatch = ''
substituteInPlace setup.cfg \
--replace-fail "--cov=proton.vpn.connection --cov-report html --cov-report term" ""
'';
pythonImportsCheck = [ "proton.vpn.connection" ];
nativeCheckInputs = [
pytestCheckHook
];
disabledTests = [
# Permission denied: '/run'
"test_ensure_configuration_file_is_deleted"
"test_ensure_generate_is_returning_expected_content"
"test_ensure_same_configuration_file_in_case_of_duplicate"
"test_ensure_configuration_file_is_created"
"test_wireguard_config_content_generation"
"test_wireguard_with_malformed_credentials"
"test_wireguard_with_non_certificate"
"test_wireguard_without_settings"
# Neiter udp or tcp are working
"test_ovpnconfig_with_settings"
"test_ovpnconfig_with_missing_settings_applies_expected_defaults"
"test_ovpnconfig_with_malformed_params"
"test_ovpnconfig_with_certificate_and_malformed_credentials"
"test_ovpnconfig_with_malformed_server"
"test_ovpnconfig_with_malformed_server_and_credentials"
];
meta = with lib; {
description = "Defines the interface that VPN connection backends should implement";
homepage = "https://github.com/ProtonVPN/python-proton-vpn-connection";
license = licenses.gpl3Only;
maintainers = with maintainers; [ wolfangaukang ];
};
}
|