diff --git a/pkgs/tools/networking/dhcp/default.nix b/pkgs/tools/networking/dhcp/default.nix index 94e59ad8b161..15d06e9d42d3 100644 --- a/pkgs/tools/networking/dhcp/default.nix +++ b/pkgs/tools/networking/dhcp/default.nix @@ -21,9 +21,14 @@ stdenv.mkDerivation rec { substituteInPlace $out/sbin/dhclient-script \ --replace /sbin/ip ${iproute}/sbin/ip wrapProgram "$out/sbin/dhclient-script" --prefix PATH : \ - "${nettools}/bin:${nettools}/sbin:${iputils}/bin" + "${nettools}/bin:${nettools}/sbin:${iputils}/bin:${stdenv.coreutils}/bin:${stdenv.gnused}/bin" ''; + preConfigure = '' + sed -i "includes/dhcpd.h" \ + -"es|^ *#define \+_PATH_DHCLIENT_SCRIPT.*$|#define _PATH_DHCLIENT_SCRIPT \"$out/sbin/dhclient-script\"|g" + ''; + meta = { description = "Dynamic Host Configuration Protocol (DHCP) tools";