From a3696aa09087dc704f4e130ec711547054000106 Mon Sep 17 00:00:00 2001 From: Stefan Lau Date: Fri, 19 May 2017 14:42:36 +0200 Subject: [PATCH] networkmanager_fortisslvpn: init at 1.2.4 --- .../services/networking/networkmanager.nix | 5 ++- .../services/x11/desktop-managers/gnome3.nix | 2 +- pkgs/desktops/gnome-3/3.22/default.nix | 4 +++ .../network-manager/fortisslvpn.nix | 36 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 5 files changed, 47 insertions(+), 2 deletions(-) create mode 100644 pkgs/tools/networking/network-manager/fortisslvpn.nix diff --git a/nixos/modules/services/networking/networkmanager.nix b/nixos/modules/services/networking/networkmanager.nix index 0c12b2c1dfd4..876dbe1524e4 100644 --- a/nixos/modules/services/networking/networkmanager.nix +++ b/nixos/modules/services/networking/networkmanager.nix @@ -124,7 +124,7 @@ in { type = types.attrsOf types.package; default = { inherit networkmanager modemmanager wpa_supplicant networkmanager_openvpn networkmanager_vpnc - networkmanager_openconnect + networkmanager_openconnect networkmanager_fortisslvpn networkmanager_pptp networkmanager_l2tp; }; internal = true; }; @@ -222,6 +222,9 @@ in { { source = "${networkmanager_openconnect}/etc/NetworkManager/VPN/nm-openconnect-service.name"; target = "NetworkManager/VPN/nm-openconnect-service.name"; } + { source = "${networkmanager_fortisslvpn}/etc/NetworkManager/VPN/nm-fortisslvpn-service.name"; + target = "NetworkManager/VPN/nm-fortisslvpn-service.name"; + } { source = "${networkmanager_pptp}/etc/NetworkManager/VPN/nm-pptp-service.name"; target = "NetworkManager/VPN/nm-pptp-service.name"; } diff --git a/nixos/modules/services/x11/desktop-managers/gnome3.nix b/nixos/modules/services/x11/desktop-managers/gnome3.nix index dc9ed8acfe47..5f99c2bcf1f1 100644 --- a/nixos/modules/services/x11/desktop-managers/gnome3.nix +++ b/nixos/modules/services/x11/desktop-managers/gnome3.nix @@ -186,7 +186,7 @@ in { networking.networkmanager.basePackages = { inherit (pkgs) networkmanager modemmanager wpa_supplicant; inherit (gnome3) networkmanager_openvpn networkmanager_vpnc - networkmanager_openconnect networkmanager_pptp + networkmanager_openconnect networkmanager_fortisslvpn networkmanager_pptp networkmanager_l2tp; }; # Needed for themes and backgrounds diff --git a/pkgs/desktops/gnome-3/3.22/default.nix b/pkgs/desktops/gnome-3/3.22/default.nix index c6b2f1a76f50..d9b26d6aee36 100644 --- a/pkgs/desktops/gnome-3/3.22/default.nix +++ b/pkgs/desktops/gnome-3/3.22/default.nix @@ -212,6 +212,10 @@ let inherit gnome3; }; + networkmanager_fortisslvpn = pkgs.networkmanager_fortisslvpn.override { + inherit gnome3; + }; + networkmanager_l2tp = pkgs.networkmanager_l2tp.override { inherit gnome3; }; diff --git a/pkgs/tools/networking/network-manager/fortisslvpn.nix b/pkgs/tools/networking/network-manager/fortisslvpn.nix new file mode 100644 index 000000000000..864af033a399 --- /dev/null +++ b/pkgs/tools/networking/network-manager/fortisslvpn.nix @@ -0,0 +1,36 @@ +{ stdenv, fetchurl, openfortivpn, automake, autoconf, libtool, intltool, pkgconfig, +networkmanager, ppp, lib, libsecret, withGnome ? true, gnome3, procps, kmod }: + +stdenv.mkDerivation rec { + name = "${pname}${if withGnome then "-gnome" else ""}-${version}"; + pname = "NetworkManager-fortisslvpn"; + major = "1.2"; + version = "${major}.4"; + + src = fetchurl { + url = "mirror://gnome/sources/${pname}/${major}/${pname}-${version}.tar.xz"; + sha256 = "0wsbj5lvf9l1w8k5nmaqnzmldilh482bn4z4k8a3wnm62xfxgscr"; + }; + + buildInputs = [ openfortivpn networkmanager ppp libtool libsecret ] + ++ stdenv.lib.optionals withGnome [ gnome3.gtk gnome3.libgnome_keyring gnome3.gconf gnome3.networkmanagerapplet ]; + + nativeBuildInputs = [ automake autoconf intltool pkgconfig ]; + + configureFlags = [ + "${if withGnome then "--with-gnome" else "--without-gnome"}" + "--disable-static" + "--localstatedir=/tmp" + ]; + + preConfigure = '' + substituteInPlace "src/nm-fortisslvpn-service.c" \ + --replace "/bin/openfortivpn" "${openfortivpn}/bin/openfortivpn" + ''; + + meta = { + description = "NetworkManager's FortiSSL plugin"; + inherit (networkmanager.meta) maintainers platforms; + }; +} + diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index efe4e47f9904..34209524504b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3192,6 +3192,8 @@ with pkgs; networkmanager_openconnect = callPackage ../tools/networking/network-manager/openconnect.nix { }; + networkmanager_fortisslvpn = callPackage ../tools/networking/network-manager/fortisslvpn.nix { }; + networkmanager_strongswan = callPackage ../tools/networking/network-manager/strongswan.nix { }; networkmanagerapplet = newScope gnome2 ../tools/networking/network-manager-applet { };