networkmanager-fortisslvpn: clean up
This commit is contained in:
parent
cb32ca2645
commit
93d728b2ed
@ -1,32 +1,33 @@
|
||||
{ stdenv, fetchurl, openfortivpn, automake, autoconf, libtool, intltool, pkgconfig,
|
||||
{ stdenv, fetchurl, substituteAll, openfortivpn, intltool, pkgconfig,
|
||||
networkmanager, ppp, libsecret, withGnome ? true, gnome3 }:
|
||||
|
||||
let
|
||||
pname = "NetworkManager-fortisslvpn";
|
||||
pname = "NetworkManager-fortisslvpn";
|
||||
version = "1.2.8";
|
||||
in stdenv.mkDerivation rec {
|
||||
name = "${pname}${if withGnome then "-gnome" else ""}-${version}";
|
||||
name = "${pname}${if withGnome then "-gnome" else ""}-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
|
||||
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"
|
||||
patches = [
|
||||
(substituteAll {
|
||||
src = ./fix-paths.patch;
|
||||
inherit openfortivpn;
|
||||
})
|
||||
];
|
||||
|
||||
preConfigure = ''
|
||||
substituteInPlace "src/nm-fortisslvpn-service.c" \
|
||||
--replace "/bin/openfortivpn" "${openfortivpn}/bin/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 {
|
||||
@ -35,9 +36,10 @@ in stdenv.mkDerivation rec {
|
||||
};
|
||||
};
|
||||
|
||||
meta = {
|
||||
meta = with stdenv.lib; {
|
||||
description = "NetworkManager's FortiSSL plugin";
|
||||
inherit (networkmanager.meta) maintainers platforms;
|
||||
license = licenses.gpl2;
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,11 @@
|
||||
--- a/src/nm-fortisslvpn-service.c
|
||||
+++ b/src/nm-fortisslvpn-service.c
|
||||
@@ -387,7 +387,7 @@
|
||||
{
|
||||
static const char *openfortivpn_binary_paths[] =
|
||||
{
|
||||
- "/bin/openfortivpn",
|
||||
+ "@openfortivpn@/bin/openfortivpn",
|
||||
"/usr/bin/openfortivpn",
|
||||
"/usr/local/bin/openfortivpn",
|
||||
NULL
|
Loading…
x
Reference in New Issue
Block a user