2019-03-22 00:46:33 +01:00
|
|
|
{ stdenv, fetchurl, substituteAll, openfortivpn, intltool, pkgconfig, file, gtk3,
|
2020-03-16 01:22:11 +01:00
|
|
|
networkmanager, ppp, libsecret, withGnome ? true, gnome3, fetchpatch, libnma }:
|
2017-05-19 14:42:36 +02:00
|
|
|
|
2018-03-07 06:10:00 +01:00
|
|
|
let
|
2018-08-09 16:56:46 +02:00
|
|
|
pname = "NetworkManager-fortisslvpn";
|
2019-03-22 00:46:33 +01:00
|
|
|
version = "1.2.10";
|
2019-08-13 23:52:01 +02:00
|
|
|
in stdenv.mkDerivation {
|
2018-08-09 16:56:46 +02:00
|
|
|
name = "${pname}${if withGnome then "-gnome" else ""}-${version}";
|
2017-05-19 14:42:36 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2018-08-09 16:56:46 +02:00
|
|
|
url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
|
2019-03-22 00:46:33 +01:00
|
|
|
sha256 = "1sw66cxgs4in4cjp1cm95c5ijsk8xbbmq4ykg2jwqwgz6cf2lr3s";
|
2017-05-19 14:42:36 +02:00
|
|
|
};
|
|
|
|
|
2018-08-09 16:56:46 +02:00
|
|
|
patches = [
|
|
|
|
(substituteAll {
|
|
|
|
src = ./fix-paths.patch;
|
|
|
|
inherit openfortivpn;
|
|
|
|
})
|
2019-09-16 05:44:39 +02:00
|
|
|
# Don't use etc/dbus-1/system.d
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://gitlab.gnome.org/GNOME/NetworkManager-fortisslvpn/merge_requests/11.patch";
|
|
|
|
sha256 = "0l7l2r1njh62lh2pf497ibf99sgkvjsj58xr76qx3jxgq9zfw6n9";
|
|
|
|
})
|
2018-08-09 16:56:46 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [ openfortivpn networkmanager ppp ]
|
2020-03-16 01:22:11 +01:00
|
|
|
++ stdenv.lib.optionals withGnome [ gtk3 libsecret libnma ];
|
2017-05-19 14:42:36 +02:00
|
|
|
|
2019-03-22 00:46:33 +01:00
|
|
|
nativeBuildInputs = [ intltool pkgconfig file ];
|
2017-05-19 14:42:36 +02:00
|
|
|
|
|
|
|
configureFlags = [
|
2018-08-28 15:00:27 +02:00
|
|
|
"--without-libnm-glib"
|
2018-08-09 16:56:46 +02:00
|
|
|
"--with-gnome=${if withGnome then "yes" else "no"}"
|
2019-10-17 14:00:00 +02:00
|
|
|
"--localstatedir=/var"
|
2018-09-23 12:53:46 +02:00
|
|
|
"--enable-absolute-paths"
|
2017-05-19 14:42:36 +02:00
|
|
|
];
|
|
|
|
|
2019-10-17 14:00:00 +02:00
|
|
|
# the installer only create an empty directory in localstatedir, so
|
|
|
|
# we can drop it
|
|
|
|
installFlags = [ "localstatedir=." ];
|
|
|
|
|
2018-03-07 06:10:00 +01:00
|
|
|
passthru = {
|
|
|
|
updateScript = gnome3.updateScript {
|
|
|
|
packageName = pname;
|
|
|
|
attrPath = "networkmanager-fortisslvpn";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2018-08-09 16:56:46 +02:00
|
|
|
meta = with stdenv.lib; {
|
2017-05-19 14:42:36 +02:00
|
|
|
description = "NetworkManager's FortiSSL plugin";
|
|
|
|
inherit (networkmanager.meta) maintainers platforms;
|
2018-08-09 16:56:46 +02:00
|
|
|
license = licenses.gpl2;
|
2017-05-19 14:42:36 +02:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|