From a0840027a1a6bec2cb14094aa58b262ddba2a3a8 Mon Sep 17 00:00:00 2001 From: Benedikt Tissot Date: Wed, 5 Jun 2024 10:25:42 +0200 Subject: [PATCH 1/2] eduvpn-client: 4.2.1 -> 4.3.1 --- .../ed/eduvpn-client/nix-python-prefix.patch | 13 ------------- pkgs/by-name/ed/eduvpn-client/package.nix | 11 +++-------- 2 files changed, 3 insertions(+), 21 deletions(-) delete mode 100644 pkgs/by-name/ed/eduvpn-client/nix-python-prefix.patch diff --git a/pkgs/by-name/ed/eduvpn-client/nix-python-prefix.patch b/pkgs/by-name/ed/eduvpn-client/nix-python-prefix.patch deleted file mode 100644 index 4d5fc53b0993..000000000000 --- a/pkgs/by-name/ed/eduvpn-client/nix-python-prefix.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/eduvpn/utils.py b/eduvpn/utils.py -index db0bf0c..76fc52a 100644 ---- a/eduvpn/utils.py -+++ b/eduvpn/utils.py -@@ -69,7 +69,7 @@ def get_prefix() -> str: - """ - target = "share/eduvpn/builder/mainwindow.ui" - local = path.dirname(path.dirname(path.abspath(__file__))) -- options = [local, path.expanduser("~/.local"), "/usr/local", prefix] -+ options = ["@out@"] - for option in options: - logger.debug(f"looking for '{target}' in '{option}'") - if path.isfile(path.join(option, target)): diff --git a/pkgs/by-name/ed/eduvpn-client/package.nix b/pkgs/by-name/ed/eduvpn-client/package.nix index 8a4fd7db89e8..3211636b8440 100644 --- a/pkgs/by-name/ed/eduvpn-client/package.nix +++ b/pkgs/by-name/ed/eduvpn-client/package.nix @@ -12,11 +12,12 @@ python3Packages.buildPythonApplication rec { pname = "eduvpn-client"; - version = "4.2.1"; + version = "4.3.1"; + format = "pyproject"; src = fetchurl { url = "https://github.com/eduvpn/python-${pname}/releases/download/${version}/python-${pname}-${version}.tar.xz"; - hash = "sha256-57EKWOzGfA4ihVYTyfLF2yoe7hN/7OnEkG+zLz7QtxI="; + hash = "sha256-8k5ZbbN2OvoFFq0nn+fftQfQJbGhb2MEvZNokMXegr0="; }; nativeBuildInputs = [ @@ -38,12 +39,6 @@ python3Packages.buildPythonApplication rec { setuptools ]; - patches = [ ./nix-python-prefix.patch ]; - - postPatch = '' - substituteInPlace eduvpn/utils.py --subst-var-by out $out - ''; - checkInputs = with python3Packages; [ pytestCheckHook ]; From 22362b362743287cf6f31d7c42ee7f10344ddd05 Mon Sep 17 00:00:00 2001 From: Benedikt Tissot Date: Wed, 5 Jun 2024 10:25:21 +0200 Subject: [PATCH 2/2] libeduvpn-common: 1.2.1 -> 2.0.1 --- pkgs/by-name/li/libeduvpn-common/package.nix | 4 ++-- .../eduvpn-common/use-nix-lib.patch | 23 ++++--------------- 2 files changed, 6 insertions(+), 21 deletions(-) diff --git a/pkgs/by-name/li/libeduvpn-common/package.nix b/pkgs/by-name/li/libeduvpn-common/package.nix index cafe417348cb..a0b559fa31e7 100644 --- a/pkgs/by-name/li/libeduvpn-common/package.nix +++ b/pkgs/by-name/li/libeduvpn-common/package.nix @@ -5,11 +5,11 @@ buildGoModule rec { pname = "libeduvpn-common"; - version = "1.2.1"; + version = "2.0.1"; src = fetchurl { url = "https://github.com/eduvpn/eduvpn-common/releases/download/${version}/eduvpn-common-${version}.tar.xz"; - hash = "sha256-MCMbOVDx9nQwTLH8EjCFD2T6mFwwFX8Jvae8PIrstvU="; + hash = "sha256-hTF9CSqU9c0+TOK+/oRGjY1fBCKpisiiTJnWZqcdvjA="; }; vendorHash = null; diff --git a/pkgs/development/python-modules/eduvpn-common/use-nix-lib.patch b/pkgs/development/python-modules/eduvpn-common/use-nix-lib.patch index a8f4975280c2..ea40fe496e96 100644 --- a/pkgs/development/python-modules/eduvpn-common/use-nix-lib.patch +++ b/pkgs/development/python-modules/eduvpn-common/use-nix-lib.patch @@ -1,25 +1,10 @@ -diff --git a/eduvpn_common/loader.py b/eduvpn_common/loader.py -index 673d180..195f8c1 100644 --- a/eduvpn_common/loader.py +++ b/eduvpn_common/loader.py -@@ -21,6 +21,7 @@ def load_lib() -> CDLL: +@@ -22,6 +22,7 @@ def load_lib() -> CDLL: :return: The Go shared library loaded with cdll.LoadLibrary from ctypes :rtype: CDLL """ + return cdll.LoadLibrary("@libeduvpn-common@") - lib_prefixes = defaultdict( - lambda: "lib", - { -diff --git a/setup.py b/setup.py -index 0d23379..a9d7926 100755 ---- a/setup.py -+++ b/setup.py -@@ -92,4 +92,6 @@ class bdist_wheel(_bdist_wheel): - self.exports_lib_path = "../../exports/lib" # default - - def run(self): -+ _bdist_wheel.run(self) -+ return - self.plat_name_supplied = True # Force use platform - - libpath = getlibpath(self.plat_name) + libfile = f"libeduvpn_common-{__version__}.so" + + lib = None