46 lines
1.2 KiB
Nix
46 lines
1.2 KiB
Nix
{ stdenv, fetchurl, substituteAll, openfortivpn, intltool, pkgconfig,
|
|
networkmanager, ppp, libsecret, withGnome ? true, gnome3 }:
|
|
|
|
let
|
|
pname = "NetworkManager-fortisslvpn";
|
|
version = "1.2.8";
|
|
in stdenv.mkDerivation rec {
|
|
name = "${pname}${if withGnome then "-gnome" else ""}-${version}";
|
|
|
|
src = fetchurl {
|
|
url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
|
|
sha256 = "01gvdv9dknvzx05plq863jh1xz1v8vgj5w7v9fmw5v601ggybf4w";
|
|
};
|
|
|
|
patches = [
|
|
(substituteAll {
|
|
src = ./fix-paths.patch;
|
|
inherit openfortivpn;
|
|
})
|
|
];
|
|
|
|
buildInputs = [ openfortivpn networkmanager ppp ]
|
|
++ stdenv.lib.optionals withGnome [ gnome3.gtk libsecret gnome3.networkmanagerapplet ];
|
|
|
|
nativeBuildInputs = [ intltool pkgconfig ];
|
|
|
|
configureFlags = [
|
|
"--with-gnome=${if withGnome then "yes" else "no"}"
|
|
"--localstatedir=/tmp"
|
|
];
|
|
|
|
passthru = {
|
|
updateScript = gnome3.updateScript {
|
|
packageName = pname;
|
|
attrPath = "networkmanager-fortisslvpn";
|
|
};
|
|
};
|
|
|
|
meta = with stdenv.lib; {
|
|
description = "NetworkManager's FortiSSL plugin";
|
|
inherit (networkmanager.meta) maintainers platforms;
|
|
license = licenses.gpl2;
|
|
};
|
|
}
|
|
|