From 5c183191278b91bdb2be03a60299e7bab43f6ab3 Mon Sep 17 00:00:00 2001 From: Armijn Hemel Date: Thu, 5 Aug 2004 19:30:00 +0000 Subject: [PATCH] iputils, as used in Red Hat Linux (there are a few flavours around apparently). *** BIG FAT WARNING *** Right now these tools can only be used as root, because they are normally installed SUID root! svn path=/nixpkgs/trunk/; revision=1234 --- pkgs/os-specific/linux/iputils/builder.sh | 29 ++++++++++++++++++++++ pkgs/os-specific/linux/iputils/default.nix | 12 +++++++++ 2 files changed, 41 insertions(+) create mode 100644 pkgs/os-specific/linux/iputils/builder.sh create mode 100644 pkgs/os-specific/linux/iputils/default.nix diff --git a/pkgs/os-specific/linux/iputils/builder.sh b/pkgs/os-specific/linux/iputils/builder.sh new file mode 100644 index 000000000000..49e80c2d0da1 --- /dev/null +++ b/pkgs/os-specific/linux/iputils/builder.sh @@ -0,0 +1,29 @@ +. $stdenv/setup + +tar jxvf $src +cd iputils + +echo $src +echo $kernelHeaders +echo $glibc + +sed -e "s^KERNEL_INCLUDE=.*$^KERNEL_INCLUDE=$kernelHeaders/include^" < Makefile > Makefile.new + +mv Makefile.new Makefile +sed -e "s^LIBC_INCLUDE=.*$^LIBC_INCLUDE=$glibc/include^" < Makefile > Makefile.new +mv Makefile.new Makefile + +make + +mkdir -p $out/bin +mkdir -p $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/ + +exit(1) diff --git a/pkgs/os-specific/linux/iputils/default.nix b/pkgs/os-specific/linux/iputils/default.nix new file mode 100644 index 000000000000..34029bdddd65 --- /dev/null +++ b/pkgs/os-specific/linux/iputils/default.nix @@ -0,0 +1,12 @@ +{stdenv, fetchurl, kernelHeaders, glibc}: + +stdenv.mkDerivation { + name = "iputils"; + builder = ./builder.sh; + src = fetchurl { + url = http://www.tux.org/pub/net/ip-routing/iputils-ss021109-try.tar.bz2; + md5 = "dd10ef3d76480990a2174d2bb0daddaf"; + }; + + inherit kernelHeaders glibc; +}