about summary refs log tree commit diff
path: root/pkgs/by-name/ed/eduvpn-client/package.nix
blob: 8a4fd7db89e82eb64f3d496545cdad93c957f3e0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
{ lib
, fetchurl
, gdk-pixbuf
, gobject-introspection
, gtk3
, libnotify
, libsecret
, networkmanager
, python3Packages
, wrapGAppsHook3
}:

python3Packages.buildPythonApplication rec {
  pname = "eduvpn-client";
  version = "4.2.1";

  src = fetchurl {
    url = "https://github.com/eduvpn/python-${pname}/releases/download/${version}/python-${pname}-${version}.tar.xz";
    hash = "sha256-57EKWOzGfA4ihVYTyfLF2yoe7hN/7OnEkG+zLz7QtxI=";
  };

  nativeBuildInputs = [
    gdk-pixbuf
    gobject-introspection
    wrapGAppsHook3
  ];

  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;
  };
}