about summary refs log tree commit diff
path: root/pkgs/tools/networking/gp-saml-gui/default.nix
blob: d2c3bfc2921039e03d41d0b50821fc26aafdab3f (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
{ lib
, stdenv
, fetchFromGitHub
, buildPythonPackage
, webkitgtk
, wrapGAppsHook3
, glib-networking
, gobject-introspection
, openconnect
, pygobject3
, requests
}:
buildPythonPackage rec {
  pname = "gp-saml-gui";
  version = "0.1+20230507-${lib.strings.substring 0 7 src.rev}";

  src = fetchFromGitHub {
    owner = "dlenski";
    repo = "gp-saml-gui";
    rev = "258f47cdc4a8ed57a1eef16667f6cad0d1cb49b1";
    sha256 = "sha256-g10S8C32mnOymCmGNdM8gmGpYn5/ObMJK3g6amKtQmI=";
  };

  buildInputs = lib.optional stdenv.isLinux glib-networking;

  nativeBuildInputs = [ wrapGAppsHook3 gobject-introspection glib-networking ];

  propagatedBuildInputs = [
    requests
    pygobject3
    openconnect
  ] ++ lib.optional stdenv.isLinux webkitgtk;

  preFixup = ''
    gappsWrapperArgs+=(
      --set WEBKIT_DISABLE_COMPOSITING_MODE "1"
    )
  '';

  meta = with lib; {
    description = "Interactively authenticate to GlobalProtect VPNs that require SAML";
    mainProgram = "gp-saml-gui";
    homepage = "https://github.com/dlenski/gp-saml-gui";
    license = licenses.gpl3Only;
    maintainers = [ maintainers.pallix ];
  };
}