summary refs log tree commit diff
path: root/pkgs/os-specific/linux/iputils
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2011-02-02 16:05:18 +0000
committerEelco Dolstra <eelco.dolstra@logicblox.com>2011-02-02 16:05:18 +0000
commit74c988959aa36fb9716a08530e1dc9c82f6ec588 (patch)
tree8f9c1abab9d7ff72e500dd54e7d05250e8d553d0 /pkgs/os-specific/linux/iputils
parentb899921afed6d0be9825597246c1bc670c3eee64 (diff)
downloadnixpkgs-74c988959aa36fb9716a08530e1dc9c82f6ec588.tar
nixpkgs-74c988959aa36fb9716a08530e1dc9c82f6ec588.tar.gz
nixpkgs-74c988959aa36fb9716a08530e1dc9c82f6ec588.tar.bz2
nixpkgs-74c988959aa36fb9716a08530e1dc9c82f6ec588.tar.lz
nixpkgs-74c988959aa36fb9716a08530e1dc9c82f6ec588.tar.xz
nixpkgs-74c988959aa36fb9716a08530e1dc9c82f6ec588.tar.zst
nixpkgs-74c988959aa36fb9716a08530e1dc9c82f6ec588.zip
* Updated iputils (though perhaps we should just use GNU inetutils).
svn path=/nixpkgs/trunk/; revision=25765
Diffstat (limited to 'pkgs/os-specific/linux/iputils')
-rw-r--r--pkgs/os-specific/linux/iputils/builder.sh18
-rw-r--r--pkgs/os-specific/linux/iputils/default.nix30
-rw-r--r--pkgs/os-specific/linux/iputils/open-max.patch30
3 files changed, 22 insertions, 56 deletions
diff --git a/pkgs/os-specific/linux/iputils/builder.sh b/pkgs/os-specific/linux/iputils/builder.sh
deleted file mode 100644
index b5219c3fefc..00000000000
--- a/pkgs/os-specific/linux/iputils/builder.sh
+++ /dev/null
@@ -1,18 +0,0 @@
-source $stdenv/setup
-
-makeFlags="KERNEL_INCLUDE=$kernelHeaders/include LIBC_INCLUDE=$glibc/include"
-
-preConfigure="sed -e 's@check-kernel @@' -i Makefile"
-
-installPhase="
-mkdir -pv $out/bin $out/sbin
-install -c arping $out/sbin/
-install -c ping $out/bin/
-install -c ping6 $out/sbin/
-install -c rdisc $out/sbin/
-install -c tracepath $out/sbin/
-install -c tracepath6 $out/sbin/
-install -c traceroute6 $out/sbin/
-";
-
-genericBuild
diff --git a/pkgs/os-specific/linux/iputils/default.nix b/pkgs/os-specific/linux/iputils/default.nix
index 81433a313b9..a50aefaec97 100644
--- a/pkgs/os-specific/linux/iputils/default.nix
+++ b/pkgs/os-specific/linux/iputils/default.nix
@@ -1,15 +1,29 @@
-{stdenv, fetchurl, linuxHeaders, glibc}:
+{ stdenv, fetchurl, libsysfs, openssl }:
 
-assert stdenv.isLinux && stdenv.system != "powerpc-linux";
+assert stdenv ? glibc;
 
 stdenv.mkDerivation {
-  name = "iputils-20020927";
-  builder = ./builder.sh;
+  name = "iputils-20101006";
+  
   src = fetchurl {
-    url = ftp://ftp.nl.debian.org/debian/pool/main/i/iputils/iputils_20020927.orig.tar.gz;
-    md5 = "b5493f7a2997130a4f86c486c9993b86";
+    url = http://www.skbuff.net/iputils/iputils-s20101006.tar.bz2;
+    sha256 = "1rvfvdnmzlmgy9a6xv5v4n785zmn10v2l7yaq83rdfgbh1ng8fpx";
   };
 
-  inherit linuxHeaders glibc;
-  patches = [ ./open-max.patch ];
+  buildInputs = [ libsysfs openssl ];
+
+  # Urgh, it uses Make's `-l' dependency "feature". 
+  makeFlags = "VPATH=${libsysfs}/lib:${stdenv.glibc}/lib:${openssl}/lib";
+
+  installPhase =
+    ''
+      mkdir -p $out/sbin
+      cp -p arping ping ping6 rdisc tracepath tracepath6 traceroute6 $out/sbin/
+    '';
+    
+  meta = {
+    homepage = http://www.skbuff.net/iputils/;
+    description = "A set of small useful utilities for Linux networking";
+    platforms = stdenv.lib.platforms.linux;
+  };
 }
diff --git a/pkgs/os-specific/linux/iputils/open-max.patch b/pkgs/os-specific/linux/iputils/open-max.patch
deleted file mode 100644
index 26bb95bd9d8..00000000000
--- a/pkgs/os-specific/linux/iputils/open-max.patch
+++ /dev/null
@@ -1,30 +0,0 @@
---- iputils-s20070202/rdisc.c.open-max	2007-08-07 11:34:03.000000000 +0200
-+++ iputils-s20070202/rdisc.c	2007-08-07 11:41:30.000000000 +0200
-@@ -240,14 +240,25 @@
- {
- 	int t;
- 	pid_t pid;
--	
-+	long open_max;
-+
- 	if (trace)
- 		return;
- 
-+	if ((open_max = sysconf(_SC_OPEN_MAX)) == -1) {
-+		if (errno == 0) {
-+			(void) fprintf(stderr, "OPEN_MAX is not supported\n");
-+		}
-+		else {
-+			(void) fprintf(stderr, "sysconf() error\n");
-+		}
-+		exit(1);
-+	}
-+
- 	if ((pid=fork()) != 0)
- 		exit(0);
- 
--	for (t = 0; t < OPEN_MAX; t++)
-+	for (t = 0; t < open_max; t++)
- 		if (t != s)
- 			close(t);
-