1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 setuptools,
6 proton-core,
7 pytestCheckHook,
8}:
9
10buildPythonPackage rec {
11 pname = "proton-vpn-killswitch";
12 version = "0.4.0";
13 pyproject = true;
14
15 src = fetchFromGitHub {
16 owner = "ProtonVPN";
17 repo = "python-proton-vpn-killswitch";
18 rev = "v${version}";
19 hash = "sha256-XZqjAhxgIiATJd3JcW2WWUMC1b6+cfZRhXlIPyMUFH8=";
20 };
21
22 nativeBuildInputs = [ setuptools ];
23
24 propagatedBuildInputs = [ proton-core ];
25
26 postPatch = ''
27 substituteInPlace setup.cfg \
28 --replace "--cov=proton --cov-report=html --cov-report=term" ""
29 '';
30
31 pythonImportsCheck = [ "proton.vpn.killswitch.interface" ];
32
33 nativeCheckInputs = [ pytestCheckHook ];
34
35 meta = with lib; {
36 description = "Defines the ProtonVPN kill switch interface";
37 homepage = "https://github.com/ProtonVPN/python-proton-vpn-killswitch";
38 license = licenses.gpl3Only;
39 maintainers = with maintainers; [ wolfangaukang ];
40 };
41}