make openvpn work with networkmanagerapplet

This commit is contained in:
Domen Kozar 2013-05-10 22:28:31 +02:00
parent 4b166d6944
commit b38ae22a2d
2 changed files with 22 additions and 11 deletions

View file

@ -1,7 +1,7 @@
{ stdenv, fetchurl, intltool, pkgconfig, gtk, libglade, networkmanager, GConf
, libnotify, libgnome_keyring, dbus_glib, polkit, isocodes
, mobile_broadband_provider_info, glib_networking, gsettings_desktop_schemas
, makeWrapper }:
, makeWrapper, networkmanager_openvpn }:
let
pn = "network-manager-applet";
@ -29,6 +29,8 @@ stdenv.mkDerivation rec {
];
postInstall = ''
ln -s ${networkmanager_openvpn}/etc/NetworkManager $out/etc/NetworkManager
ln -s ${networkmanager_openvpn}/lib/* $out/lib
wrapProgram "$out/bin/nm-applet" \
--prefix GIO_EXTRA_MODULES : "${glib_networking}/lib/gio/modules" \
--prefix XDG_DATA_DIRS : "${gsettings_desktop_schemas}/share:$out/share" \

View file

@ -1,14 +1,14 @@
{ stdenv, fetchurl, openvpn, intltool, pkgconfig, networkmanager
, withGnome ? true, gtk2, libgnome_keyring }:
, withGnome ? true, gtk2, libgnome_keyring, procps, module_init_tools }:
stdenv.mkDerivation rec {
name = "${pname}${if withGnome then "-gnome" else ""}-${version}";
pname = "NetworkManager-openvpn";
version = "0.9.4.0";
version = "0.9.6.0";
src = fetchurl {
url = "mirror://gnome/sources/${pname}/0.9/${pname}-${version}.tar.xz";
sha256 = "1q436v2vlyxjj2b89jr3zny640xdjpslbrjb39ks1lrc1jqp0j6h";
sha256 = "18w7mlgnm7y5kg3s2jfm8biymh33ggw97bz27m5mg69kg42qgf4g";
};
buildInputs = [ openvpn networkmanager ]
@ -18,17 +18,26 @@ stdenv.mkDerivation rec {
configureFlags = [
"${if withGnome then "--with-gnome --with-gtkver=2" else "--without-gnome"}"
"--disable-static"
];
preBuild = ''
sed -i 's/-Wstrict-prototypes//' auth-dialog/Makefile
sed -i 's/-Werror//' auth-dialog/Makefile
sed -i 's/-Wstrict-prototypes//' properties/Makefile
sed -i 's/-Werror//' properties/Makefile
preConfigure = ''
substituteInPlace "configure" \
--replace "/sbin/sysctl" "${procps}/sbin/sysctl"
substituteInPlace "src/nm-openvpn-service.c" \
--replace "/sbin/openvpn" "${openvpn}/sbin/openvpn" \
--replace "/sbin/modprobe" "${module_init_tools}/sbin/modprobe"
substituteInPlace "properties/auth-helpers.c" \
--replace "/sbin/openvpn" "${openvpn}/sbin/openvpn"
'';
postInstall = ''
# ln -s $out/NetworkManager/VPN /etc/NetworkManager/VPN
postConfigure = ''
substituteInPlace "./auth-dialog/Makefile" \
--replace "-Wstrict-prototypes" "" \
--replace "-Werror" ""
substituteInPlace "properties/Makefile" \
--replace "-Wstrict-prototypes" "" \
--replace "-Werror" ""
'';
meta = {