Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / proton-vpn-connection / default.nix
blob9fb7250f10b334fc3a1978384a751ed1aa9bf532
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , setuptools
5 , proton-core
6 , proton-vpn-killswitch
7 , proton-vpn-logger
8 , jinja2
9 , pytestCheckHook
12 buildPythonPackage rec {
13   pname = "proton-vpn-connection";
14   version = "0.14.4";
15   pyproject = true;
17   src = fetchFromGitHub {
18     owner = "ProtonVPN";
19     repo = "python-proton-vpn-connection";
20     rev = "refs/tags/v${version}";
21     hash = "sha256-Ze/te0G0tDzyZPGVVqvuJlZoHWJqJ36LnHO+Cy5nxx8=";
22   };
24   nativeBuildInputs = [
25     setuptools
26   ];
28   propagatedBuildInputs = [
29     jinja2
30     proton-core
31     proton-vpn-killswitch
32     proton-vpn-logger
33   ];
35   postPatch = ''
36     substituteInPlace setup.cfg \
37       --replace-fail "--cov=proton.vpn.connection --cov-report html --cov-report term" ""
38   '';
40   pythonImportsCheck = [ "proton.vpn.connection" ];
42   nativeCheckInputs = [
43     pytestCheckHook
44   ];
46   disabledTests = [
47     # Permission denied: '/run'
48     "test_ensure_configuration_file_is_deleted"
49     "test_ensure_generate_is_returning_expected_content"
50     "test_ensure_same_configuration_file_in_case_of_duplicate"
51     "test_ensure_configuration_file_is_created"
52     "test_wireguard_config_content_generation"
53     "test_wireguard_with_malformed_credentials"
54     "test_wireguard_with_non_certificate"
55     "test_wireguard_without_settings"
56     # Neiter udp or tcp are working
57     "test_ovpnconfig_with_settings"
58     "test_ovpnconfig_with_missing_settings_applies_expected_defaults"
59     "test_ovpnconfig_with_malformed_params"
60     "test_ovpnconfig_with_certificate_and_malformed_credentials"
61     "test_ovpnconfig_with_malformed_server"
62     "test_ovpnconfig_with_malformed_server_and_credentials"
63   ];
65   meta = with lib; {
66     description = "Defines the interface that VPN connection backends should implement";
67     homepage = "https://github.com/ProtonVPN/python-proton-vpn-connection";
68     license = licenses.gpl3Only;
69     maintainers = with maintainers; [ wolfangaukang ];
70   };