From 91e960b40011a04ea4d44c6e0344127961098264 Mon Sep 17 00:00:00 2001 From: Armijn Hemel Date: Sun, 16 Oct 2005 21:48:27 +0000 Subject: [PATCH] remove dependency on /bin/bash for dhclient svn path=/nixpkgs/trunk/; revision=4094 --- pkgs/system/all-packages-generic.nix | 2 +- pkgs/tools/networking/dhcp/builder.sh | 1 + pkgs/tools/networking/dhcp/default.nix | 6 +++--- pkgs/tools/networking/dhcp/dhcp-3.0.3-bash.patch | 9 +++++++++ 4 files changed, 14 insertions(+), 4 deletions(-) create mode 100644 pkgs/tools/networking/dhcp/dhcp-3.0.3-bash.patch diff --git a/pkgs/system/all-packages-generic.nix b/pkgs/system/all-packages-generic.nix index 2f1eef380882..d62d8e8bb232 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 98f3cd6b2ec4..e2e61fd4e94c 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 aa8c6a222ed6..4ad93d6c15d0 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 000000000000..7f2f9177397a --- /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