3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/tools/networking/network-manager/fortisslvpn.nix

44 lines
1.3 KiB
Nix
Raw Normal View History

{ stdenv, fetchurl, openfortivpn, automake, autoconf, libtool, intltool, pkgconfig,
networkmanager, ppp, lib, libsecret, withGnome ? true, gnome3, procps, kmod }:
let
pname = "NetworkManager-fortisslvpn";
2018-03-13 01:03:18 +00:00
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";
2018-03-13 01:03:18 +00:00
sha256 = "01gvdv9dknvzx05plq863jh1xz1v8vgj5w7v9fmw5v601ggybf4w";
};
buildInputs = [ openfortivpn networkmanager ppp libtool libsecret ]
++ stdenv.lib.optionals withGnome [ gnome3.gtk gnome3.libgnome-keyring gnome3.gconf 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;
};
}