about summary refs log tree commit diff
path: root/pkgs/tools
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools')
-rw-r--r--pkgs/tools/networking/inetutils/default.nix29
-rw-r--r--pkgs/tools/networking/p2p/libtorrent/default.nix20
-rw-r--r--pkgs/tools/networking/p2p/rtorrent/default.nix20
-rw-r--r--pkgs/tools/networking/vpnc/default.nix20
4 files changed, 86 insertions, 3 deletions
diff --git a/pkgs/tools/networking/inetutils/default.nix b/pkgs/tools/networking/inetutils/default.nix
new file mode 100644
index 0000000000000..e276ec10aa41c
--- /dev/null
+++ b/pkgs/tools/networking/inetutils/default.nix
@@ -0,0 +1,29 @@
+{stdenv, fetchurl}:
+
+stdenv.mkDerivation rec {
+  name = "inetutils-1.5";
+  src = fetchurl {
+    url = "mirror://gnu/inetutils/${name}.tar.gz";
+    sha256 = "048my5fgxnjwr1jcka8yq36c7i019p60r0mg4f6zz96pmys76p1l";
+  };
+
+  # Make sure `configure' honors `$TMPDIR' for chroot builds.
+  patchPhase = ''
+    cat configure | sed -'es|/tmp/,iu|$TMPDIR/,iu|g' > ,,tmp && \
+    mv ,,tmp configure && chmod +x configure
+  '';
+
+  postInstall = ''
+    # XXX: These programs are normally installed setuid but since it
+    # fails, they end up being non-executable, hence this hack.
+    chmod +x $out/bin/{ping,ping6,rcp,rlogin,rsh}
+  '';
+
+  meta = {
+    description = ''GNU Inetutils is a collection of common network
+                    programs, including telnet, FTP, RSH, rlogin and
+		    TFTP clients and servers, among others.'';
+    homepage = http://www.gnu.org/software/inetutils/;
+    license = "GPLv3+";
+  };
+}
diff --git a/pkgs/tools/networking/p2p/libtorrent/default.nix b/pkgs/tools/networking/p2p/libtorrent/default.nix
new file mode 100644
index 0000000000000..d8cdc26fd38c0
--- /dev/null
+++ b/pkgs/tools/networking/p2p/libtorrent/default.nix
@@ -0,0 +1,20 @@
+args: with args;
+stdenv.mkDerivation ( rec {
+  pname = "libtorrent";
+  version = "0.11.9";
+
+  name = "${pname}-${version}";
+  
+  src = fetchurl {
+    url = "http://libtorrent.rakshasa.no/downloads/${name}.tar.gz";
+    sha256 = "71f09218a7784b21ab53cdfcd8fa122da60352e5ca117fda7cd8d2763f908a08";
+  };
+
+  buildInputs = [ pkgconfig openssl libsigcxx ];
+  
+  meta = {
+    description = "
+      LibTorrent is a BitTorrent library written in C++ for *nix, with a focus on high performance and good code.
+    ";
+  };
+})
diff --git a/pkgs/tools/networking/p2p/rtorrent/default.nix b/pkgs/tools/networking/p2p/rtorrent/default.nix
new file mode 100644
index 0000000000000..04b50f9d5d250
--- /dev/null
+++ b/pkgs/tools/networking/p2p/rtorrent/default.nix
@@ -0,0 +1,20 @@
+args: with args;
+stdenv.mkDerivation ( rec {
+  pname = "rtorrent";
+  version = "0.7.9";
+
+  name = "${pname}-${version}";
+  
+  src = fetchurl {
+    url = "http://libtorrent.rakshasa.no/downloads/${name}.tar.gz";
+    sha256 = "f06f72b1fec94177147b1db0aab15be4f62d1b0354811a67ae74e0cd1e50a119";
+  };
+
+  buildInputs = [ libtorrent ncurses pkgconfig libsigcxx curl zlib openssl ];
+  
+  meta = {
+    description = "
+      rtorrent is a ncurses client for libtorrent and is ideal for use with screen or dtach.
+    ";
+  };
+})
diff --git a/pkgs/tools/networking/vpnc/default.nix b/pkgs/tools/networking/vpnc/default.nix
index c11a4721cb744..87e979330aebe 100644
--- a/pkgs/tools/networking/vpnc/default.nix
+++ b/pkgs/tools/networking/vpnc/default.nix
@@ -1,4 +1,4 @@
-{stdenv, fetchurl, libgcrypt, perl}:
+args: with args;
 
 stdenv.mkDerivation {
   name = "vpnc-0.5.1";
@@ -9,11 +9,25 @@ stdenv.mkDerivation {
 
   patches = [ ./makefile.patch ];
 
-  buildInputs = [libgcrypt perl];
+  # The `etc/vpnc/vpnc-script' script relies on `which' and on
+  # `ifconfig' as found in net-tools (not GNU Inetutils).
+  propagatedBuildInputs = [which nettools];
+
+  buildInputs = [libgcrypt perl makeWrapper];
+
   builder = ./builder.sh;
 
+  postInstall = ''
+    for i in $out/{bin,sbin}/*
+    do
+      wrapProgram $i --prefix PATH :  \
+        "${which}/bin:${nettools}/bin:${nettools}/sbin"
+    done
+  '';
+
   meta = {
-    description = "VPNC, a virtual private network (VPN) client for Cisco's VPN concentrators";
+    description = ''VPNC, a virtual private network (VPN) client
+                    for Cisco's VPN concentrators.'';
     homepage = http://www.unix-ag.uni-kl.de/~massar/vpnc/;
     license = "GPL";
   };