22 buildPythonPackage rec {
23 pname = "protonvpn-nm-lib";
25 format = "setuptools";
26 disabled = pythonOlder "3.7";
28 src = fetchFromGitHub {
31 rev = "refs/tags/${version}";
32 hash = "sha256-n3jfBHMYqyQZgvFFJcylNbTWZ3teuqhdelTfpNrwWuA=";
35 propagatedBuildInputs = [
52 src = ./0001-Patching-GIRepository.patch;
53 networkmanager_path = "${networkmanager}/lib/girepository-1.0";
58 substituteInPlace protonvpn_nm_lib/core/dbus/dbus_reconnect.py \
59 --replace "exec_start = python_interpreter_path + \" \" + python_service_path" "exec_start = \"$out/bin/protonvpn_reconnector.py\""
63 makeWrapper ${python.interpreter} $out/bin/protonvpn_reconnector.py \
64 --add-flags $out/${python.sitePackages}/protonvpn_nm_lib/daemon/dbus_daemon_reconnector.py \
65 --prefix PYTHONPATH : "$PYTHONPATH"
68 # Checks cannot be run in the sandbox
69 # "Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory"
72 pythonImportsCheck = [ "protonvpn_nm_lib" ];
75 description = "ProtonVPN NetworkManager Library intended for every ProtonVPN service user";
76 mainProgram = "protonvpn_reconnector.py";
77 homepage = "https://github.com/ProtonVPN/protonvpn-nm-lib";
78 license = licenses.gpl3Only;
80 platforms = platforms.linux;