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 }:
|
networkmanager, ppp, libsecret, withGnome ? true, gnome3 }:
|
||||||
|
|
||||||
let
|
let
|
||||||
pname = "NetworkManager-fortisslvpn";
|
pname = "NetworkManager-fortisslvpn";
|
||||||
version = "1.2.8";
|
version = "1.2.8";
|
||||||
in stdenv.mkDerivation rec {
|
in stdenv.mkDerivation rec {
|
||||||
name = "${pname}${if withGnome then "-gnome" else ""}-${version}";
|
name = "${pname}${if withGnome then "-gnome" else ""}-${version}";
|
||||||
|
|
||||||
src = fetchurl {
|
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";
|
sha256 = "01gvdv9dknvzx05plq863jh1xz1v8vgj5w7v9fmw5v601ggybf4w";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ openfortivpn networkmanager ppp libtool libsecret ]
|
patches = [
|
||||||
++ stdenv.lib.optionals withGnome [ gnome3.gtk gnome3.libgnome-keyring gnome3.networkmanagerapplet ];
|
(substituteAll {
|
||||||
|
src = ./fix-paths.patch;
|
||||||
nativeBuildInputs = [ automake autoconf intltool pkgconfig ];
|
inherit openfortivpn;
|
||||||
|
})
|
||||||
configureFlags = [
|
|
||||||
"${if withGnome then "--with-gnome" else "--without-gnome"}"
|
|
||||||
"--disable-static"
|
|
||||||
"--localstatedir=/tmp"
|
|
||||||
];
|
];
|
||||||
|
|
||||||
preConfigure = ''
|
buildInputs = [ openfortivpn networkmanager ppp ]
|
||||||
substituteInPlace "src/nm-fortisslvpn-service.c" \
|
++ stdenv.lib.optionals withGnome [ gnome3.gtk libsecret gnome3.networkmanagerapplet ];
|
||||||
--replace "/bin/openfortivpn" "${openfortivpn}/bin/openfortivpn"
|
|
||||||
'';
|
nativeBuildInputs = [ intltool pkgconfig ];
|
||||||
|
|
||||||
|
configureFlags = [
|
||||||
|
"--with-gnome=${if withGnome then "yes" else "no"}"
|
||||||
|
"--localstatedir=/tmp"
|
||||||
|
];
|
||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
updateScript = gnome3.updateScript {
|
updateScript = gnome3.updateScript {
|
||||||
@ -35,9 +36,10 @@ in stdenv.mkDerivation rec {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
meta = {
|
meta = with stdenv.lib; {
|
||||||
description = "NetworkManager's FortiSSL plugin";
|
description = "NetworkManager's FortiSSL plugin";
|
||||||
inherit (networkmanager.meta) maintainers platforms;
|
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