diff --git a/pkgs/development/libraries/wxGTK-2.6/default.nix b/pkgs/development/libraries/wxGTK-2.6/default.nix index 547ed0773a93..3df819028b60 100644 --- a/pkgs/development/libraries/wxGTK-2.6/default.nix +++ b/pkgs/development/libraries/wxGTK-2.6/default.nix @@ -26,5 +26,8 @@ stdenv.mkDerivation { (if unicode then "--enable-unicode" else "") ]; + postBuild = "(cd contrib/src && make)"; + postInstall = "(cd contrib/src && make install)"; + inherit gtk compat22; } diff --git a/pkgs/development/python-modules/pycrypto/default.nix b/pkgs/development/python-modules/pycrypto/default.nix new file mode 100644 index 000000000000..ac98ea08c433 --- /dev/null +++ b/pkgs/development/python-modules/pycrypto/default.nix @@ -0,0 +1,12 @@ +{stdenv, fetchurl, python}: + +stdenv.mkDerivation { + name = "pycrypto-2.0.1"; + src = fetchurl { + url = http://www.amk.ca/files/python/crypto/pycrypto-2.0.1.tar.gz; + md5 = "4d5674f3898a573691ffb335e8d749cd"; + }; + buildInputs = [python]; + buildPhase = "true"; + installPhase = "python ./setup.py install --prefix=$out"; +} diff --git a/pkgs/development/python-modules/twisted/default.nix b/pkgs/development/python-modules/twisted/default.nix index cbcadbb99cbe..37a42faf8568 100644 --- a/pkgs/development/python-modules/twisted/default.nix +++ b/pkgs/development/python-modules/twisted/default.nix @@ -6,7 +6,8 @@ stdenv.mkDerivation { url = http://tmrc.mit.edu/mirror/twisted/Twisted/2.4/Twisted-2.4.0.tar.bz2; md5 = "42eb0c8fd0f8707a39fff1dd6adab27d"; }; - buildInputs = [python ZopeInterface]; + buildInputs = [python]; + propagatedBuildInputs = [ZopeInterface]; buildPhase = "true"; - installPhase = "PYTHONPATH=$(toPythonPath $out):$PYTHONPATH; python ./setup.py install --prefix=$out"; + installCommand = "PYTHONPATH=$(toPythonPath $out):$PYTHONPATH; python ./setup.py install --prefix=$out"; } diff --git a/pkgs/development/python-modules/wxPython/builder.sh b/pkgs/development/python-modules/wxPython/builder.sh index 280f01e26341..e4dce866c676 100644 --- a/pkgs/development/python-modules/wxPython/builder.sh +++ b/pkgs/development/python-modules/wxPython/builder.sh @@ -1,6 +1,6 @@ source $stdenv/setup -flags="WXPORT=gtk2 BUILD_GLCANVAS=0 BUILD_OGL=0" +flags="WXPORT=gtk2 NO_HEADERS=1 BUILD_GLCANVAS=0 BUILD_OGL=0 UNICODE=1" configurePhase() { cd wxPython diff --git a/pkgs/development/python-modules/wxPython/default.nix b/pkgs/development/python-modules/wxPython/default.nix index 7db7e287778d..e31b2a2ea75f 100644 --- a/pkgs/development/python-modules/wxPython/default.nix +++ b/pkgs/development/python-modules/wxPython/default.nix @@ -3,12 +3,12 @@ assert wxGTK.compat22; stdenv.mkDerivation { - name = "wxPython-2.4.2.4"; + name = "wxPython-2.6.3.3"; builder = ./builder.sh; src = fetchurl { - url = http://nix.cs.uu.nl/dist/tarballs/wxPythonSrc-2.4.2.4.tar.gz; - md5 = "ea4eb68e10a0c2a9be643b35dcb78e41"; + url = http://prdownloads.sourceforge.net/wxpython/wxPython-src-2.6.3.3.tar.bz2; + md5 = "66b9c5f8e20a9505c39dab1a1234daa9"; }; buildInputs = [pkgconfig wxGTK (wxGTK.gtk) python]; inherit wxGTK; # !!! move this down -} // { inherit python; } +} 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"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 58dc005e8141..b1b038b47c6d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -237,7 +237,8 @@ rec { }; bittorrent = import ../tools/networking/p2p/bittorrent { - inherit fetchurl stdenv python pygtk makeWrapper; + inherit fetchurl stdenv makeWrapper python wxPython pycrypto twisted; + gui = true; }; bsdiff = import ../tools/compression/bsdiff { @@ -1956,6 +1957,10 @@ rec { ### DEVELOPMENT / PYTHON MODULES + pycrypto = import ../development/python-modules/pycrypto { + inherit fetchurl stdenv python; + }; + pygtk = import ../development/python-modules/pygtk { inherit fetchurl stdenv python pkgconfig; inherit (gtkLibs) glib gtk; @@ -1966,7 +1971,8 @@ rec { }; twisted = import ../development/python-modules/twisted { - inherit fetchurl stdenv python ZopeInterface; + inherit fetchurl python ZopeInterface; + stdenv = stdenvNew; }; ZopeInterface = import ../development/python-modules/ZopeInterface {