summary refs log tree commit diff
path: root/pkgs/tools/networking/dhcp
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2008-05-08 22:08:58 +0000
committerLudovic Courtès <ludo@gnu.org>2008-05-08 22:08:58 +0000
commit8b838d3cb2920aade3d20b1353f1fdb40d97a360 (patch)
tree27708af3f9567912e0dfc9c429ef281997b365bc /pkgs/tools/networking/dhcp
parentfb790c15e9ceacbbd1cbbbfd78ea4588b55a55a0 (diff)
downloadnixpkgs-8b838d3cb2920aade3d20b1353f1fdb40d97a360.tar
nixpkgs-8b838d3cb2920aade3d20b1353f1fdb40d97a360.tar.gz
nixpkgs-8b838d3cb2920aade3d20b1353f1fdb40d97a360.tar.bz2
nixpkgs-8b838d3cb2920aade3d20b1353f1fdb40d97a360.tar.lz
nixpkgs-8b838d3cb2920aade3d20b1353f1fdb40d97a360.tar.xz
nixpkgs-8b838d3cb2920aade3d20b1353f1fdb40d97a360.tar.zst
nixpkgs-8b838d3cb2920aade3d20b1353f1fdb40d97a360.zip
dhcp: Fix path of `dhclient-script' used in `dhclient', fix dependencies of `dhclient-script'.
svn path=/nixpkgs/trunk/; revision=11788
Diffstat (limited to 'pkgs/tools/networking/dhcp')
-rw-r--r--pkgs/tools/networking/dhcp/builder.sh4
-rw-r--r--pkgs/tools/networking/dhcp/default.nix20
2 files changed, 17 insertions, 7 deletions
diff --git a/pkgs/tools/networking/dhcp/builder.sh b/pkgs/tools/networking/dhcp/builder.sh
index f630a4aa1a2..645d9326406 100644
--- a/pkgs/tools/networking/dhcp/builder.sh
+++ b/pkgs/tools/networking/dhcp/builder.sh
@@ -11,6 +11,10 @@ makeFlagsArray=(CLIENT_PATH='\"FAKE_PATH=/nothing\"' \
 
 configurePhase=configurePhase
 configurePhase() {
+    # Patch the header that contains absolute paths to the tools.
+    sed -i "includes/dhcpd.h" \
+	-"es|^ *#define \+_PATH_DHCLIENT_SCRIPT.*$|#define _PATH_DHCLIENT_SCRIPT \"$out/sbin/dhclient-script\"|g"
+
     ./configure
 }
 
diff --git a/pkgs/tools/networking/dhcp/default.nix b/pkgs/tools/networking/dhcp/default.nix
index 7777c1d5662..063dc15532b 100644
--- a/pkgs/tools/networking/dhcp/default.nix
+++ b/pkgs/tools/networking/dhcp/default.nix
@@ -8,20 +8,26 @@ stdenv.mkDerivation {
     url = http://ftp.isc.org/isc/dhcp/dhcp-3.0.6.tar.gz;
     sha256 = "0k8gy3ab9kzs4qcc9apgnxi982lhggha41fkw9w1bmvmz7mv0xwz";
   };
-  buildInputs = [ groff nettools makeWrapper ];
-#  inherit nettools coreutils iputils gnused bash;
+
+  buildInputs = [ groff nettools coreutils makeWrapper ];
+
   patches = [ ./resolv-without-domain.patch ./no-mkdir-var-run.patch ];
 
   postInstall = ''
     wrapProgram "$out/sbin/dhclient-script" --prefix PATH : \
-      "${nettools}/bin:${nettools}/sbin"
+      "${nettools}/bin:${nettools}/sbin:${coreutils}/bin:${gnused}/bin"
   '';
 
   meta = {
-    description = ''ISC's Dynamic Host Configuration Protocol (DHCP)
-                    distribution provides a freely redistributable reference
-		    implementation of all aspects of DHCP, through a suite
-		    of DHCP tools: server, client, and relay agent.'';
+    description = "Dynamic Host Configuration Protocol (DHCP) tools";
+
+    longDescription = ''
+      ISC's Dynamic Host Configuration Protocol (DHCP) distribution
+      provides a freely redistributable reference implementation of
+      all aspects of DHCP, through a suite of DHCP tools: server,
+      client, and relay agent.
+   '';
+
     homepage = http://www.isc.org/products/DHCP/;
     license = "http://www.isc.org/sw/dhcp/dhcp-copyright.php";
   };