diff --git a/pkgs/system/all-packages-generic.nix b/pkgs/system/all-packages-generic.nix index 2f1eef38088..d62d8e8bb23 100644 --- a/pkgs/system/all-packages-generic.nix +++ b/pkgs/system/all-packages-generic.nix @@ -197,7 +197,7 @@ rec { }; dhcp = (import ../tools/networking/dhcp) { - inherit fetchurl stdenv groff nettools coreutils iputils gnused; + inherit fetchurl stdenv groff nettools coreutils iputils gnused bash; }; dhcpWrapper = (import ../tools/networking/dhcp-wrapper) { diff --git a/pkgs/tools/networking/dhcp/builder.sh b/pkgs/tools/networking/dhcp/builder.sh index 98f3cd6b2ec..e2e61fd4e94 100755 --- a/pkgs/tools/networking/dhcp/builder.sh +++ b/pkgs/tools/networking/dhcp/builder.sh @@ -10,6 +10,7 @@ configurePhase() { preBuild() { sed -e "s^@nettools\@^$nettools^g" \ -e "s^@coreutils\@^$coreutils^g" \ + -e "s^@bash\@^$bash^g" \ -e "s^@iputils\@^$iputils^g" \ -e "s^@gnused\@^$gnused^g" \ < client/scripts/linux > client/scripts/linux.tmp diff --git a/pkgs/tools/networking/dhcp/default.nix b/pkgs/tools/networking/dhcp/default.nix index aa8c6a222ed..4ad93d6c15d 100644 --- a/pkgs/tools/networking/dhcp/default.nix +++ b/pkgs/tools/networking/dhcp/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl, groff, nettools, coreutils, iputils, gnused}: +{stdenv, fetchurl, groff, nettools, coreutils, iputils, gnused, bash}: stdenv.mkDerivation { name = "dhcp-3.0.3"; @@ -8,6 +8,6 @@ stdenv.mkDerivation { md5 = "f91416a0b8ed3fd0601688cf0b7df58f"; }; buildInputs = [groff]; - inherit nettools coreutils iputils gnused; - patches = [./dhcp-3.0.3-path.patch]; + inherit nettools coreutils iputils gnused bash; + patches = [./dhcp-3.0.3-path.patch ./dhcp-3.0.3-bash.patch]; } diff --git a/pkgs/tools/networking/dhcp/dhcp-3.0.3-bash.patch b/pkgs/tools/networking/dhcp/dhcp-3.0.3-bash.patch new file mode 100644 index 00000000000..7f2f9177397 --- /dev/null +++ b/pkgs/tools/networking/dhcp/dhcp-3.0.3-bash.patch @@ -0,0 +1,9 @@ +diff -ruN dhcp-3.0.3/client/scripts/linux dhcp-3.0.3.new/client/scripts/linux +--- dhcp-3.0.3/client/scripts/linux 2002-11-15 02:09:09.000000000 +0100 ++++ dhcp-3.0.3.new/client/scripts/linux 2005-10-16 22:42:09.000000000 +0200 +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!@bash@/bin/bash + # dhclient-script for Linux. Dan Halbert, March, 1997. + # Updated for Linux 2.[12] by Brian J. Murrell, January 1999. + # No guarantees about this. I'm a novice at the details of Linux