22 buildPythonPackage rec {
23 pname = "protonvpn-nm-lib";
25 disabled = pythonOlder "3.7";
27 src = fetchFromGitHub {
30 rev = "refs/tags/${version}";
31 sha256 = "sha256-i6Y+ardptWCVO2SzzluAOQp6MDO6Xzm0NneiqzkhHrw=";
34 propagatedBuildInputs = [
51 src = ./0001-Patching-GIRepository.patch;
52 networkmanager_path = "${networkmanager}/lib/girepository-1.0";
57 substituteInPlace protonvpn_nm_lib/core/dbus/dbus_reconnect.py \
58 --replace "exec_start = python_interpreter_path + \" \" + python_service_path" "exec_start = \"$out/bin/protonvpn_reconnector.py\""
62 makeWrapper ${python.interpreter} $out/bin/protonvpn_reconnector.py \
63 --add-flags $out/${python.sitePackages}/protonvpn_nm_lib/daemon/dbus_daemon_reconnector.py \
64 --prefix PYTHONPATH : "$PYTHONPATH"
67 # Checks cannot be run in the sandbox
68 # "Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory"
71 pythonImportsCheck = [ "protonvpn_nm_lib" ];
74 description = "ProtonVPN NetworkManager Library intended for every ProtonVPN service user";
75 homepage = "https://github.com/ProtonVPN/protonvpn-nm-lib";
76 license = licenses.gpl3Only;
77 maintainers = with maintainers; [ wolfangaukang ];
78 platforms = platforms.linux;