mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-02 15:41:48 +00:00
44 lines
1.3 KiB
Nix
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;
|
|
};
|
|
}
|
|
|