2019-03-21 23:46:33 +00:00
|
|
|
{ stdenv, fetchurl, substituteAll, openfortivpn, intltool, pkgconfig, file, gtk3,
|
2018-07-21 01:44:44 +01:00
|
|
|
networkmanager, ppp, libsecret, withGnome ? true, gnome3 }:
|
2017-05-19 13:42:36 +01:00
|
|
|
|
2018-03-07 05:10:00 +00:00
|
|
|
let
|
2018-08-09 15:56:46 +01:00
|
|
|
pname = "NetworkManager-fortisslvpn";
|
2019-03-21 23:46:33 +00:00
|
|
|
version = "1.2.10";
|
2018-03-07 05:10:00 +00:00
|
|
|
in stdenv.mkDerivation rec {
|
2018-08-09 15:56:46 +01:00
|
|
|
name = "${pname}${if withGnome then "-gnome" else ""}-${version}";
|
2017-05-19 13:42:36 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2018-08-09 15:56:46 +01:00
|
|
|
url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
|
2019-03-21 23:46:33 +00:00
|
|
|
sha256 = "1sw66cxgs4in4cjp1cm95c5ijsk8xbbmq4ykg2jwqwgz6cf2lr3s";
|
2017-05-19 13:42:36 +01:00
|
|
|
};
|
|
|
|
|
2018-08-09 15:56:46 +01:00
|
|
|
patches = [
|
|
|
|
(substituteAll {
|
|
|
|
src = ./fix-paths.patch;
|
|
|
|
inherit openfortivpn;
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [ openfortivpn networkmanager ppp ]
|
2019-02-13 21:47:50 +00:00
|
|
|
++ stdenv.lib.optionals withGnome [ gtk3 libsecret gnome3.networkmanagerapplet ];
|
2017-05-19 13:42:36 +01:00
|
|
|
|
2019-03-21 23:46:33 +00:00
|
|
|
nativeBuildInputs = [ intltool pkgconfig file ];
|
2017-05-19 13:42:36 +01:00
|
|
|
|
|
|
|
configureFlags = [
|
2018-08-28 14:00:27 +01:00
|
|
|
"--without-libnm-glib"
|
2018-08-09 15:56:46 +01:00
|
|
|
"--with-gnome=${if withGnome then "yes" else "no"}"
|
2017-05-19 13:42:36 +01:00
|
|
|
"--localstatedir=/tmp"
|
2018-09-23 11:53:46 +01:00
|
|
|
"--enable-absolute-paths"
|
2017-05-19 13:42:36 +01:00
|
|
|
];
|
|
|
|
|
2018-03-07 05:10:00 +00:00
|
|
|
passthru = {
|
|
|
|
updateScript = gnome3.updateScript {
|
|
|
|
packageName = pname;
|
|
|
|
attrPath = "networkmanager-fortisslvpn";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2018-08-09 15:56:46 +01:00
|
|
|
meta = with stdenv.lib; {
|
2017-05-19 13:42:36 +01:00
|
|
|
description = "NetworkManager's FortiSSL plugin";
|
|
|
|
inherit (networkmanager.meta) maintainers platforms;
|
2018-08-09 15:56:46 +01:00
|
|
|
license = licenses.gpl2;
|
2017-05-19 13:42:36 +01:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|