blob: d0f62ac6f9982690ee502f89a8f08a2dbb9d6285 (
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
|
{ lib
, buildPythonPackage
, fetchFromGitHub
, gobject-introspection
, setuptools
, networkmanager
, proton-vpn-killswitch
, proton-vpn-logger
, pycairo
, pygobject3
, pytestCheckHook
}:
buildPythonPackage {
pname = "proton-vpn-killswitch-network-manager";
version = "0.2.0-unstable-2023-09-05";
pyproject = true;
src = fetchFromGitHub {
owner = "ProtonVPN";
repo = "python-proton-vpn-killswitch-network-manager";
rev = "39d4398f169539e335c1f661e0dfc5551df0e6af";
hash = "sha256-vmTXMIhXZgRvXeUX/XslT+ShqY60w4P7kJBQzWhA66k=";
};
nativeBuildInputs = [
# Solves ImportError: cannot import name NM, introspection typelib not found
gobject-introspection
setuptools
];
propagatedBuildInputs = [
# Needed here for the NM namespace
networkmanager
proton-vpn-killswitch
proton-vpn-logger
pycairo
pygobject3
];
postPatch = ''
substituteInPlace setup.cfg \
--replace "--cov=proton.vpn.killswitch.backend.linux.networkmanager --cov-report=html --cov-report=term" ""
'';
pythonImportsCheck = [ "proton.vpn.killswitch.backend.linux.networkmanager" ];
nativeCheckInputs = [
pytestCheckHook
];
meta = with lib; {
description = "Implementation of the proton-vpn-killswitch interface using Network Manager";
homepage = "https://github.com/ProtonVPN/python-proton-vpn-killswitch-network-manager";
license = licenses.gpl3Only;
maintainers = with maintainers; [ wolfangaukang ];
};
}
|