2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
gobject-introspection,
|
|
|
|
setuptools,
|
|
|
|
networkmanager,
|
|
|
|
proton-core,
|
|
|
|
proton-vpn-connection,
|
|
|
|
pycairo,
|
|
|
|
pygobject3,
|
|
|
|
pytest-asyncio,
|
|
|
|
pytestCheckHook,
|
2024-01-02 11:29:13 +00:00
|
|
|
}:
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
buildPythonPackage rec {
|
2024-01-02 11:29:13 +00:00
|
|
|
pname = "proton-vpn-network-manager";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "0.4.2";
|
2024-01-02 11:29:13 +00:00
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ProtonVPN";
|
|
|
|
repo = "python-proton-vpn-network-manager";
|
2024-02-29 20:09:43 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-zw6fzay1zCBIrouDg2EMhaxDLKIYV5TKYK5lQ3v8W6o=";
|
2024-01-02 11:29:13 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
# Needed to recognize the NM namespace
|
|
|
|
gobject-introspection
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
# Needed here for the NM namespace
|
|
|
|
networkmanager
|
|
|
|
proton-core
|
|
|
|
proton-vpn-connection
|
|
|
|
pycairo
|
|
|
|
pygobject3
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.cfg \
|
2024-02-29 20:09:43 +00:00
|
|
|
--replace-fail "--cov=proton/vpn/backend/linux/networkmanager --cov-report html --cov-report term" ""
|
2024-01-02 11:29:13 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "proton.vpn.backend.linux.networkmanager" ];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
2024-02-29 20:09:43 +00:00
|
|
|
pytest-asyncio
|
2024-01-02 11:29:13 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Provides the necessary functionality for other ProtonVPN components to interact with NetworkManager";
|
|
|
|
homepage = "https://github.com/ProtonVPN/python-proton-vpn-network-manager";
|
|
|
|
license = licenses.gpl3Only;
|
2024-06-24 18:47:55 +00:00
|
|
|
maintainers = [ ];
|
2024-01-02 11:29:13 +00:00
|
|
|
};
|
|
|
|
}
|