2022-03-15 20:30:03 +00:00
|
|
|
|
{ stdenv
|
|
|
|
|
, lib
|
2020-06-10 14:19:13 +01:00
|
|
|
|
, fetchurl
|
|
|
|
|
, substituteAll
|
|
|
|
|
, openfortivpn
|
2020-06-10 14:22:35 +01:00
|
|
|
|
, gettext
|
2020-06-10 14:19:13 +01:00
|
|
|
|
, pkg-config
|
|
|
|
|
, file
|
2020-06-10 14:22:35 +01:00
|
|
|
|
, glib
|
2020-06-10 14:19:13 +01:00
|
|
|
|
, gtk3
|
2022-03-15 20:30:03 +00:00
|
|
|
|
, gtk4
|
2020-06-10 14:19:13 +01:00
|
|
|
|
, networkmanager
|
|
|
|
|
, ppp
|
|
|
|
|
, libsecret
|
|
|
|
|
, withGnome ? true
|
2021-05-07 22:18:14 +01:00
|
|
|
|
, gnome
|
2020-06-10 14:19:13 +01:00
|
|
|
|
, libnma
|
2022-03-15 20:30:03 +00:00
|
|
|
|
, libnma-gtk4
|
2020-06-10 14:19:13 +01:00
|
|
|
|
}:
|
2017-05-19 13:42:36 +01:00
|
|
|
|
|
2020-06-10 14:19:13 +01:00
|
|
|
|
stdenv.mkDerivation rec {
|
2018-08-09 15:56:46 +01:00
|
|
|
|
pname = "NetworkManager-fortisslvpn";
|
2022-03-15 20:30:03 +00:00
|
|
|
|
version = "1.4.0";
|
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 {
|
2021-01-15 09:19:50 +00:00
|
|
|
|
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
|
2022-03-15 20:30:03 +00:00
|
|
|
|
sha256 = "sFXiY0m1FrI1hXmKs+9XtDawFIAOkqiscyz8jnbF2vo=";
|
2017-05-19 13:42:36 +01:00
|
|
|
|
};
|
|
|
|
|
|
2018-08-09 15:56:46 +01:00
|
|
|
|
patches = [
|
|
|
|
|
(substituteAll {
|
|
|
|
|
src = ./fix-paths.patch;
|
|
|
|
|
inherit openfortivpn;
|
|
|
|
|
})
|
|
|
|
|
];
|
|
|
|
|
|
2020-06-10 14:19:13 +01:00
|
|
|
|
nativeBuildInputs = [
|
2020-06-10 14:22:35 +01:00
|
|
|
|
gettext
|
2020-06-10 14:19:13 +01:00
|
|
|
|
pkg-config
|
|
|
|
|
file
|
|
|
|
|
];
|
2017-05-19 13:42:36 +01:00
|
|
|
|
|
2020-06-10 14:19:13 +01:00
|
|
|
|
buildInputs = [
|
|
|
|
|
openfortivpn
|
|
|
|
|
networkmanager
|
|
|
|
|
ppp
|
2020-06-10 14:22:35 +01:00
|
|
|
|
glib
|
2021-01-15 09:19:50 +00:00
|
|
|
|
] ++ lib.optionals withGnome [
|
2020-06-10 14:19:13 +01:00
|
|
|
|
gtk3
|
2022-03-15 20:30:03 +00:00
|
|
|
|
gtk4
|
2020-06-10 14:19:13 +01:00
|
|
|
|
libsecret
|
|
|
|
|
libnma
|
2022-03-15 20:30:03 +00:00
|
|
|
|
libnma-gtk4
|
2020-06-10 14:19:13 +01:00
|
|
|
|
];
|
2017-05-19 13:42:36 +01:00
|
|
|
|
|
|
|
|
|
configureFlags = [
|
2018-08-09 15:56:46 +01:00
|
|
|
|
"--with-gnome=${if withGnome then "yes" else "no"}"
|
2022-03-15 20:30:03 +00:00
|
|
|
|
"--with-gtk4=${if withGnome then "yes" else "no"}"
|
2019-10-17 13:00:00 +01:00
|
|
|
|
"--localstatedir=/var"
|
2018-09-23 11:53:46 +01:00
|
|
|
|
"--enable-absolute-paths"
|
2017-05-19 13:42:36 +01:00
|
|
|
|
];
|
|
|
|
|
|
2020-06-10 14:19:13 +01:00
|
|
|
|
installFlags = [
|
|
|
|
|
# the installer only creates an empty directory in localstatedir, so
|
|
|
|
|
# we can drop it
|
|
|
|
|
"localstatedir=."
|
|
|
|
|
];
|
2019-10-17 13:00:00 +01:00
|
|
|
|
|
2018-03-07 05:10:00 +00:00
|
|
|
|
passthru = {
|
2021-05-07 22:18:14 +01:00
|
|
|
|
updateScript = gnome.updateScript {
|
2018-03-07 05:10:00 +00:00
|
|
|
|
packageName = pname;
|
|
|
|
|
attrPath = "networkmanager-fortisslvpn";
|
2021-03-20 23:57:24 +00:00
|
|
|
|
versionPolicy = "odd-unstable";
|
2018-03-07 05:10:00 +00:00
|
|
|
|
};
|
2022-03-17 03:04:10 +00:00
|
|
|
|
networkManagerPlugin = "VPN/nm-fortisslvpn-service.name";
|
2018-03-07 05:10:00 +00:00
|
|
|
|
};
|
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
|
meta = with lib; {
|
2020-06-10 14:19:13 +01:00
|
|
|
|
description = "NetworkManager’s FortiSSL plugin";
|
2017-05-19 13:42:36 +01:00
|
|
|
|
inherit (networkmanager.meta) maintainers platforms;
|
2018-08-09 15:56:46 +01:00
|
|
|
|
license = licenses.gpl2;
|
2017-05-19 13:42:36 +01:00
|
|
|
|
};
|
|
|
|
|
}
|