biome: 1.9.2 -> 1.9.3 (#349335)
[NixPkgs.git] / pkgs / development / python-modules / proton-vpn-killswitch-network-manager-wireguard / default.nix
blob8ff9321fc57c8f238a74d986f3a5a40d538b70b2
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
5   gobject-introspection,
6   setuptools,
7   networkmanager,
8   proton-vpn-api-core,
9   proton-vpn-killswitch,
10   proton-vpn-logger,
11   pycairo,
12   pygobject3,
13   pytestCheckHook,
14   iproute2,
15   pytest-cov-stub,
18 buildPythonPackage rec {
19   pname = "proton-vpn-killswitch-network-manager-wireguard";
20   version = "0.1.4";
21   pyproject = true;
23   src = fetchFromGitHub {
24     owner = "ProtonVPN";
25     repo = "python-proton-vpn-killswitch-network-manager-wireguard";
26     rev = "v${version}";
27     hash = "sha256-4sYD2X1U066FMjrtbTb31wvkCDWAw+eXod+pi0gGsCQ=";
28   };
30   nativeBuildInputs = [
31     # Solves ImportError: cannot import name NM, introspection typelib not found
32     gobject-introspection
33   ];
35   build-system = [
36     setuptools
37   ];
39   dependencies = [
40     # Needed here for the NM namespace
41     networkmanager
42     proton-vpn-api-core
43     proton-vpn-killswitch
44     proton-vpn-logger
45     pycairo
46     pygobject3
47   ];
49   postPatch = ''
50     substituteInPlace proton/vpn/killswitch/backend/linux/wireguard/killswitch_connection_handler.py \
51       --replace '/usr/sbin/ip' '${iproute2}/bin/ip'
52   '';
54   pythonImportsCheck = [ "proton.vpn.killswitch.backend.linux.wireguard" ];
56   nativeCheckInputs = [
57     pytestCheckHook
58     pytest-cov-stub
59   ];
61   meta = {
62     description = "Implementation of the proton-vpn-killswitch interface using Network Manager with wireguard-protocol";
63     homepage = "https://github.com/ProtonVPN/proton-vpn-killswitch-network-manager-wireguard";
64     license = lib.licenses.gpl3Only;
65     maintainers = with lib.maintainers; [ sebtm ];
66   };