c7cb07f092
GitOrigin-RevId: 1536926ef5621b09bba54035ae2bb6d806d72ac8
60 lines
1.4 KiB
Nix
60 lines
1.4 KiB
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, gobject-introspection
|
|
, setuptools
|
|
, networkmanager
|
|
, proton-core
|
|
, proton-vpn-connection
|
|
, pycairo
|
|
, pygobject3
|
|
, pytest-asyncio
|
|
, pytestCheckHook
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "proton-vpn-network-manager";
|
|
version = "0.3.3";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "ProtonVPN";
|
|
repo = "python-proton-vpn-network-manager";
|
|
rev = "refs/tags/v${version}";
|
|
hash = "sha256-UEXoIFLB3/q3G3ASrgsXxF21iT5rCWm4knGezcmxmnk=";
|
|
};
|
|
|
|
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 \
|
|
--replace-fail "--cov=proton/vpn/backend/linux/networkmanager --cov-report html --cov-report term" ""
|
|
'';
|
|
|
|
pythonImportsCheck = [ "proton.vpn.backend.linux.networkmanager" ];
|
|
|
|
nativeCheckInputs = [
|
|
pytest-asyncio
|
|
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;
|
|
maintainers = with maintainers; [ wolfangaukang ];
|
|
};
|
|
}
|