python3Packages.protonvpn-nm-lib: 3.8.0 -> 3.9.0

This commit is contained in:
P. R. d. O 2022-05-06 15:25:50 -06:00
parent e6b94ad07e
commit e2942bccba
No known key found for this signature in database
GPG Key ID: 7B0FF33FF90110C7
2 changed files with 35 additions and 3 deletions

View File

@ -0,0 +1,22 @@
From 2867f022aad754fe54d95222b3ae52f6e7f14c2f Mon Sep 17 00:00:00 2001
From: "P. R. d. O" <d.ol.rod@tutanota.com>
Date: Wed, 27 Apr 2022 21:49:12 -0600
Subject: [PATCH] Patching GIRepository
---
protonvpn_nm_lib/__init__.py | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/protonvpn_nm_lib/__init__.py b/protonvpn_nm_lib/__init__.py
index e69de29..00b95f4 100644
--- a/protonvpn_nm_lib/__init__.py
+++ b/protonvpn_nm_lib/__init__.py
@@ -0,0 +1,5 @@
+import gi
+gi.require_version('GIRepository', '2.0')
+from gi.repository import GIRepository
+repo = GIRepository.Repository.get_default()
+repo.prepend_search_path('@networkmanager_path@')
--
2.35.1

View File

@ -2,6 +2,7 @@
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
, substituteAll
, distro
, jinja2
, keyring
@ -9,18 +10,19 @@
, pygobject3
, pyxdg
, systemd
, networkmanager
}:
buildPythonPackage rec {
pname = "protonvpn-nm-lib";
version = "3.8.0";
version = "3.9.0";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "ProtonVPN";
repo = pname;
rev = version;
sha256 = "sha256-fAaP9c66LcbZgezadGPUt400YRnrnFoBvpzlc1zxuc4=";
sha256 = "sha256-yV3xeIyPc2DJj5DOa5PA1MHt00bjJ/Y9zZK77s/XRAA=";
};
propagatedBuildInputs = [
@ -33,7 +35,15 @@ buildPythonPackage rec {
systemd
];
# Project has a dummy test.
patches = [
(substituteAll {
src = ./0001-Patching-GIRepository.patch;
networkmanager_path = "${networkmanager}/lib/girepository-1.0";
})
];
# Checks cannot be run in the sandbox
# "Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory"
doCheck = false;
pythonImportsCheck = [ "protonvpn_nm_lib" ];