summary refs log tree commit diff
path: root/pkgs/tools/networking/p2p
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2006-12-13 20:30:09 +0000
committerEelco Dolstra <eelco.dolstra@logicblox.com>2006-12-13 20:30:09 +0000
commit9ea7038c5131b8eb435d7b0b1ba3a8795f3935b0 (patch)
tree6d9ebb2ddf7311dac603243e5b4b3326bdcbd0f0 /pkgs/tools/networking/p2p
parent0a91ca30911e54af6fa76c4c17ade3f2f8ba4674 (diff)
downloadnixlib-9ea7038c5131b8eb435d7b0b1ba3a8795f3935b0.tar
nixlib-9ea7038c5131b8eb435d7b0b1ba3a8795f3935b0.tar.gz
nixlib-9ea7038c5131b8eb435d7b0b1ba3a8795f3935b0.tar.bz2
nixlib-9ea7038c5131b8eb435d7b0b1ba3a8795f3935b0.tar.lz
nixlib-9ea7038c5131b8eb435d7b0b1ba3a8795f3935b0.tar.xz
nixlib-9ea7038c5131b8eb435d7b0b1ba3a8795f3935b0.tar.zst
nixlib-9ea7038c5131b8eb435d7b0b1ba3a8795f3935b0.zip
* BitTorrent 5.0.3.
* wxPython 2.6.3.

svn path=/nixpkgs/trunk/; revision=7341
Diffstat (limited to 'pkgs/tools/networking/p2p')
-rw-r--r--pkgs/tools/networking/p2p/bittorrent/builder.sh13
-rw-r--r--pkgs/tools/networking/p2p/bittorrent/default.nix15
2 files changed, 20 insertions, 8 deletions
diff --git a/pkgs/tools/networking/p2p/bittorrent/builder.sh b/pkgs/tools/networking/p2p/bittorrent/builder.sh
index 7b93d5db8ba2..6ae3bef5e237 100644
--- a/pkgs/tools/networking/p2p/bittorrent/builder.sh
+++ b/pkgs/tools/networking/p2p/bittorrent/builder.sh
@@ -1,10 +1,13 @@
 source $stdenv/setup
 source $makeWrapper
 
-buildPhase=buildPhase
-buildPhase() {
-    python setup.py build
-}
+# Workaround for:
+#  File "...-python-2.4.4/lib/python2.4/posixpath.py", line 62, in join
+#    elif path == '' or path.endswith('/'):
+# AttributeError: 'NoneType' object has no attribute 'endswith'
+export HOME=$TMP
+
+buildPhase="python setup.py build"
 
 installPhase=installPhase
 installPhase() {
@@ -16,7 +19,7 @@ installPhase() {
         # so don't move them. 
         mv $out/bin/$i $out/bin/.orig-$i
         makeWrapper $out/bin/.orig-$i $out/bin/$i \
-            --set PYTHONPATH "$out/lib/python2.4/site-packages:$pygtk/lib/python2.4/site-packages/gtk-2.0"
+            --set PYTHONPATH "$(toPythonPath $out):$PYTHONPATH"
     done
 }
 
diff --git a/pkgs/tools/networking/p2p/bittorrent/default.nix b/pkgs/tools/networking/p2p/bittorrent/default.nix
index 204b3ec06056..b48ec3c80492 100644
--- a/pkgs/tools/networking/p2p/bittorrent/default.nix
+++ b/pkgs/tools/networking/p2p/bittorrent/default.nix
@@ -1,14 +1,23 @@
-{stdenv, fetchurl, python, pygtk, makeWrapper}:
+{ gui ? false
+, stdenv, fetchurl, makeWrapper
+, python, wxPython ? null, pycrypto, twisted
+}:
+
+assert gui -> wxPython != null;
 
 stdenv.mkDerivation {
   name = "bittorrent-5.0.3";
   builder = ./builder.sh;
+  
   src = fetchurl {
     url = http://download.bittorrent.com/dl/BitTorrent-5.0.3.tar.gz;
     md5 = "592363a33c35e9f66759a736dbf7e038";
   };
-  buildInputs = [python pygtk];
-  inherit python pygtk makeWrapper;
+  
+  buildInputs = [python pycrypto twisted]
+    ++ (if gui then [wxPython] else []);
+  
+  inherit makeWrapper;
 
   meta = {
     description = "The original client for the BitTorrent peer-to-peer file sharing protocol";