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

61 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.4.2";
pyproject = true;
src = fetchFromGitHub {
owner = "ProtonVPN";
repo = "python-proton-vpn-network-manager";
rev = "refs/tags/v${version}";
hash = "sha256-zw6fzay1zCBIrouDg2EMhaxDLKIYV5TKYK5lQ3v8W6o=";
};
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 = [ ];
};
}