3
0
Fork 0
forked from mirrors/nixpkgs

eduvpn-client: init at 4.2.0

This commit is contained in:
jwijenbergh 2024-01-05 15:12:33 +01:00
parent 1cc286713d
commit 243ec9a4e7
No known key found for this signature in database
GPG key ID: 1A2298F6C34F96E5
2 changed files with 73 additions and 0 deletions

View file

@ -0,0 +1,13 @@
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)):

View file

@ -0,0 +1,60 @@
{ lib
, fetchurl
, gdk-pixbuf
, gobject-introspection
, gtk3
, libnotify
, libsecret
, networkmanager
, python3Packages
, wrapGAppsHook
}:
python3Packages.buildPythonApplication rec {
pname = "eduvpn-client";
version = "4.2.0";
src = fetchurl {
url = "https://github.com/eduvpn/python-${pname}/releases/download/${version}/python-${pname}-${version}.tar.xz";
hash = "sha256-W5z0ykrwWANZmW+lQt6m+BmYPI0cutsamx8V2JrpeHA=";
};
nativeBuildInputs = [
gdk-pixbuf
gobject-introspection
wrapGAppsHook
];
buildInputs = [
gtk3
libnotify
libsecret
networkmanager
];
propagatedBuildInputs = with python3Packages; [
eduvpn-common
pygobject3
setuptools
];
patches = [ ./nix-python-prefix.patch ];
postPatch = ''
substituteInPlace eduvpn/utils.py --subst-var-by out $out
'';
checkInputs = with python3Packages; [
pytestCheckHook
];
meta = with lib; {
changelog = "https://raw.githubusercontent.com/eduvpn/python-eduvpn-client/${version}/CHANGES.md";
description = "Linux client for eduVPN";
homepage = "https://github.com/eduvpn/python-eduvpn-client";
license = licenses.gpl3Plus;
mainProgram = "eduvpn-gui";
maintainers = with maintainers; [ benneti jwijenbergh ];
platforms = platforms.linux;
};
}