diff --git a/pkgs/tools/networking/network-manager/0.9.8/default.nix b/pkgs/tools/networking/network-manager/0.9.8/default.nix index 4fad1ca2ab9a..0c791631daa4 100644 --- a/pkgs/tools/networking/network-manager/0.9.8/default.nix +++ b/pkgs/tools/networking/network-manager/0.9.8/default.nix @@ -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 diff --git a/pkgs/tools/networking/network-manager/0.9.8/nixos-purity.patch b/pkgs/tools/networking/network-manager/0.9.8/nixos-purity.patch index 831b2010fcfc..9ebc080ba96f 100644 --- a/pkgs/tools/networking/network-manager/0.9.8/nixos-purity.patch +++ b/pkgs/tools/networking/network-manager/0.9.8/nixos-purity.patch @@ -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);