mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 23:13:19 +00:00
eduvpn-client: init at 4.2.0
This commit is contained in:
parent
1cc286713d
commit
243ec9a4e7
13
pkgs/by-name/ed/eduvpn-client/nix-python-prefix.patch
Normal file
13
pkgs/by-name/ed/eduvpn-client/nix-python-prefix.patch
Normal 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)):
|
60
pkgs/by-name/ed/eduvpn-client/package.nix
Normal file
60
pkgs/by-name/ed/eduvpn-client/package.nix
Normal 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;
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user