networkmanager098: fix binary paths

This commit is contained in:
Nikolay Amiantov 2016-08-15 10:32:51 +03:00
parent cd05a8ed00
commit b067b53011
2 changed files with 9 additions and 3 deletions

View file

@ -1,6 +1,6 @@
{ stdenv, fetchurl, intltool, pkgconfig, dbus_glib
, udev, libnl, libuuid, gnutls, dhcp
, libgcrypt, perl, libgudev }:
, libgcrypt, perl, libgudev, avahi, ppp, kmod }:
stdenv.mkDerivation rec {
name = "network-manager-${version}";
@ -13,6 +13,12 @@ stdenv.mkDerivation rec {
preConfigure = ''
substituteInPlace tools/glib-mkenums --replace /usr/bin/perl ${perl}/bin/perl
substituteInPlace src/nm-device.c \
--replace @avahi@ ${avahi} \
--replace @kmod@ ${kmod}
substituteInPlace src/ppp-manager/nm-ppp-manager.c \
--replace @ppp@ ${ppp} \
--replace @kmod@ ${kmod}
'';
# Right now we hardcode quite a few paths at build time. Probably we should

View file

@ -47,7 +47,7 @@ index 1dc94ee..e60f3c8 100644
for (iter = modules; *iter; iter++) {
- char *argv[3] = { "/sbin/modprobe", *iter, NULL };
+ char *argv[3] = { "/var/run/current-system/sw/bin/modprobe", *iter, NULL };
+ char *argv[3] = { "@kmod@/bin/modprobe", *iter, NULL };
char *envp[1] = { NULL };
GError *error = NULL;
@ -71,7 +71,7 @@ index 59698c3..7dba0f7 100644
/* Make sure /dev/ppp exists (bgo #533064) */
if (stat ("/dev/ppp", &st) || !S_ISCHR (st.st_mode))
- ignored = system ("/sbin/modprobe ppp_generic");
+ ignored = system ("/var/run/current-system/sw/bin/modprobe ppp_generic");
+ ignored = system ("@kmod@/bin/modprobe ppp_generic");
connection = nm_act_request_get_connection (req);
g_assert (connection);