nixpkgs/pkgs/tools/networking/network-manager/fortisslvpn.nix
2018-07-21 19:43:53 +02:00

44 lines
1.3 KiB
Nix

{ stdenv, fetchurl, openfortivpn, automake, autoconf, libtool, 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";
};
buildInputs = [ openfortivpn networkmanager ppp libtool libsecret ]
++ stdenv.lib.optionals withGnome [ gnome3.gtk gnome3.libgnome-keyring 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"
'';
passthru = {
updateScript = gnome3.updateScript {
packageName = pname;
attrPath = "networkmanager-fortisslvpn";
};
};
meta = {
description = "NetworkManager's FortiSSL plugin";
inherit (networkmanager.meta) maintainers platforms;
};
}