Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 gobject-introspection, 6 setuptools, 7 networkmanager, 8 proton-core, 9 proton-vpn-connection, 10 pycairo, 11 pygobject3, 12 pytest-asyncio, 13 pytestCheckHook, 14}: 15 16buildPythonPackage rec { 17 pname = "proton-vpn-network-manager"; 18 version = "0.4.2"; 19 pyproject = true; 20 21 src = fetchFromGitHub { 22 owner = "ProtonVPN"; 23 repo = "python-proton-vpn-network-manager"; 24 rev = "refs/tags/v${version}"; 25 hash = "sha256-zw6fzay1zCBIrouDg2EMhaxDLKIYV5TKYK5lQ3v8W6o="; 26 }; 27 28 nativeBuildInputs = [ 29 # Needed to recognize the NM namespace 30 gobject-introspection 31 setuptools 32 ]; 33 34 propagatedBuildInputs = [ 35 # Needed here for the NM namespace 36 networkmanager 37 proton-core 38 proton-vpn-connection 39 pycairo 40 pygobject3 41 ]; 42 43 postPatch = '' 44 substituteInPlace setup.cfg \ 45 --replace-fail "--cov=proton/vpn/backend/linux/networkmanager --cov-report html --cov-report term" "" 46 ''; 47 48 pythonImportsCheck = [ "proton.vpn.backend.linux.networkmanager" ]; 49 50 nativeCheckInputs = [ 51 pytest-asyncio 52 pytestCheckHook 53 ]; 54 55 meta = with lib; { 56 description = "Provides the necessary functionality for other ProtonVPN components to interact with NetworkManager"; 57 homepage = "https://github.com/ProtonVPN/python-proton-vpn-network-manager"; 58 license = licenses.gpl3Only; 59 maintainers = with maintainers; [ wolfangaukang ]; 60 }; 61}