Merge pull request #518 from NixOS/networkmanager-openvpn
make openvpn work with networkmanagerapplet
This commit is contained in:
commit
d16e50c3fe
|
@ -1,7 +1,7 @@
|
||||||
{ stdenv, fetchurl, intltool, pkgconfig, gtk, libglade, networkmanager, GConf
|
{ stdenv, fetchurl, intltool, pkgconfig, gtk, libglade, networkmanager, GConf
|
||||||
, libnotify, libgnome_keyring, dbus_glib, polkit, isocodes
|
, libnotify, libgnome_keyring, dbus_glib, polkit, isocodes
|
||||||
, mobile_broadband_provider_info, glib_networking, gsettings_desktop_schemas
|
, mobile_broadband_provider_info, glib_networking, gsettings_desktop_schemas
|
||||||
, makeWrapper }:
|
, makeWrapper, networkmanager_openvpn }:
|
||||||
|
|
||||||
let
|
let
|
||||||
pn = "network-manager-applet";
|
pn = "network-manager-applet";
|
||||||
|
@ -29,6 +29,8 @@ stdenv.mkDerivation rec {
|
||||||
];
|
];
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
|
ln -s ${networkmanager_openvpn}/etc/NetworkManager $out/etc/NetworkManager
|
||||||
|
ln -s ${networkmanager_openvpn}/lib/* $out/lib
|
||||||
wrapProgram "$out/bin/nm-applet" \
|
wrapProgram "$out/bin/nm-applet" \
|
||||||
--prefix GIO_EXTRA_MODULES : "${glib_networking}/lib/gio/modules" \
|
--prefix GIO_EXTRA_MODULES : "${glib_networking}/lib/gio/modules" \
|
||||||
--prefix XDG_DATA_DIRS : "${gsettings_desktop_schemas}/share:$out/share" \
|
--prefix XDG_DATA_DIRS : "${gsettings_desktop_schemas}/share:$out/share" \
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
{ stdenv, fetchurl, openvpn, intltool, pkgconfig, networkmanager
|
{ stdenv, fetchurl, openvpn, intltool, pkgconfig, networkmanager
|
||||||
, withGnome ? true, gtk2, libgnome_keyring }:
|
, withGnome ? true, gtk2, libgnome_keyring, procps, module_init_tools }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "${pname}${if withGnome then "-gnome" else ""}-${version}";
|
name = "${pname}${if withGnome then "-gnome" else ""}-${version}";
|
||||||
pname = "NetworkManager-openvpn";
|
pname = "NetworkManager-openvpn";
|
||||||
version = "0.9.4.0";
|
version = "0.9.6.0";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "mirror://gnome/sources/${pname}/0.9/${pname}-${version}.tar.xz";
|
url = "mirror://gnome/sources/${pname}/0.9/${pname}-${version}.tar.xz";
|
||||||
sha256 = "1q436v2vlyxjj2b89jr3zny640xdjpslbrjb39ks1lrc1jqp0j6h";
|
sha256 = "18w7mlgnm7y5kg3s2jfm8biymh33ggw97bz27m5mg69kg42qgf4g";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ openvpn networkmanager ]
|
buildInputs = [ openvpn networkmanager ]
|
||||||
|
@ -18,17 +18,26 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
"${if withGnome then "--with-gnome --with-gtkver=2" else "--without-gnome"}"
|
"${if withGnome then "--with-gnome --with-gtkver=2" else "--without-gnome"}"
|
||||||
|
"--disable-static"
|
||||||
];
|
];
|
||||||
|
|
||||||
preBuild = ''
|
preConfigure = ''
|
||||||
sed -i 's/-Wstrict-prototypes//' auth-dialog/Makefile
|
substituteInPlace "configure" \
|
||||||
sed -i 's/-Werror//' auth-dialog/Makefile
|
--replace "/sbin/sysctl" "${procps}/sbin/sysctl"
|
||||||
sed -i 's/-Wstrict-prototypes//' properties/Makefile
|
substituteInPlace "src/nm-openvpn-service.c" \
|
||||||
sed -i 's/-Werror//' properties/Makefile
|
--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 = ''
|
postConfigure = ''
|
||||||
# ln -s $out/NetworkManager/VPN /etc/NetworkManager/VPN
|
substituteInPlace "./auth-dialog/Makefile" \
|
||||||
|
--replace "-Wstrict-prototypes" "" \
|
||||||
|
--replace "-Werror" ""
|
||||||
|
substituteInPlace "properties/Makefile" \
|
||||||
|
--replace "-Wstrict-prototypes" "" \
|
||||||
|
--replace "-Werror" ""
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
|
Loading…
Reference in a new issue