depot/third_party/nixpkgs/pkgs/development/python-modules/proton-vpn-killswitch-network-manager/default.nix
Default email 83627f9931 Project import generated by Copybara.
GitOrigin-RevId: 2893f56de08021cffd9b6b6dfc70fd9ccd51eb60
2024-06-24 14:47:55 -04:00

57 lines
1.4 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
gobject-introspection,
setuptools,
networkmanager,
proton-vpn-killswitch,
proton-vpn-logger,
pycairo,
pygobject3,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "proton-vpn-killswitch-network-manager";
version = "0.4.3";
pyproject = true;
src = fetchFromGitHub {
owner = "ProtonVPN";
repo = "python-proton-vpn-killswitch-network-manager";
rev = "refs/tags/v${version}";
hash = "sha256-kN41b6OZ2YXoBsmNZD3NrX4uJChSmm6DVP+5LYwiZMw=";
};
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 = [ ];
};
}