diff --git a/pkgs/development/libraries/wxGTK-2.8/default.nix b/pkgs/development/libraries/wxGTK-2.8/default.nix new file mode 100644 index 00000000000..e991a934de9 --- /dev/null +++ b/pkgs/development/libraries/wxGTK-2.8/default.nix @@ -0,0 +1,51 @@ +{ stdenv, fetchurl, pkgconfig, gtk, libXinerama, libSM, libXxf86vm, xf86vidmodeproto +, compat24 ? false, compat26 ? true, unicode ? true +}: + +assert pkgconfig != null && gtk != null; +assert gtk.libtiff != null; +assert gtk.libjpeg != null; +assert gtk.libpng != null; +assert gtk.libpng.zlib != null; + +stdenv.mkDerivation { + name = "wxGTK-2.8.4"; + + src = fetchurl { + url = http://heanet.dl.sourceforge.net/sourceforge/wxwindows/wxGTK-2.8.4.tar.gz; + sha256 = "177hls125f3zjsymsww9jjkd2idb6jmp4ylwg94dsyzygsvyj58k"; + }; + + buildInputs = [ + pkgconfig gtk gtk.libtiff gtk.libjpeg gtk.libpng gtk.libpng.zlib + libXinerama libSM libXxf86vm xf86vidmodeproto + ]; + + configureFlags = [ + "--enable-gtk2" + (if compat24 then "--enable-compat24" else "--disable-compat24") + (if compat26 then "--enable-compat26" else "--disable-compat26") + "--disable-precomp-headers" + (if unicode then "--enable-unicode" else "") + ]; + + # This variable is used by configure to find some dependencies. + SEARCH_INCLUDE = + "${libXinerama}/include ${libSM}/include ${libXxf86vm}/include"; + + # Work around a bug in configure. + NIX_CFLAGS_COMPILE = "-DHAVE_X11_XLIB_H=1"; + + preConfigure = " + substituteInPlace configure --replace 'SEARCH_INCLUDE=' 'DUMMY_SEARCH_INCLUDE=' + substituteInPlace configure --replace /usr /no-such-path + "; + + postBuild = "(cd contrib/src && make)"; + postInstall = " + (cd contrib/src && make install) + (cd $out/include && ln -s wx-*/* .) + "; + + passthru = {inherit gtk compat24 compat26 unicode;}; +} diff --git a/pkgs/development/python-modules/wxPython/default.nix b/pkgs/development/python-modules/wxPython/2.6.nix similarity index 100% rename from pkgs/development/python-modules/wxPython/default.nix rename to pkgs/development/python-modules/wxPython/2.6.nix diff --git a/pkgs/development/python-modules/wxPython/2.8.nix b/pkgs/development/python-modules/wxPython/2.8.nix new file mode 100644 index 00000000000..14bb490d963 --- /dev/null +++ b/pkgs/development/python-modules/wxPython/2.8.nix @@ -0,0 +1,14 @@ +{stdenv, fetchurl, pkgconfig, wxGTK, python}: + +assert wxGTK.unicode; + +stdenv.mkDerivation { + name = "wxPython-2.8.4.0"; + builder = ./builder.sh; + src = fetchurl { + url = http://heanet.dl.sourceforge.net/sourceforge/wxpython/wxPython-src-2.8.4.0.tar.bz2; + sha256 = "0lkj29jcw3kqaf2iphgmmn9cqf2ppkm6qqr9izlx4bvn9dihgq6h"; + }; + buildInputs = [pkgconfig wxGTK (wxGTK.gtk) python]; + passthru = {inherit wxGTK;}; +} diff --git a/pkgs/tools/networking/p2p/bittorrent/builder.sh b/pkgs/tools/networking/p2p/bittorrent/builder.sh index 6ae3bef5e23..633f53ebd43 100644 --- a/pkgs/tools/networking/p2p/bittorrent/builder.sh +++ b/pkgs/tools/networking/p2p/bittorrent/builder.sh @@ -7,7 +7,12 @@ source $makeWrapper # AttributeError: 'NoneType' object has no attribute 'endswith' export HOME=$TMP -buildPhase="python setup.py build" +buildPhase=buildPhase +buildPhase() { + #substituteInPlace BitTorrent/GUI_wx/__init__.py --replace "'2.6'" "'2.8'" + python setup.py build +} + installPhase=installPhase installPhase() { diff --git a/pkgs/tools/networking/p2p/bittorrent/default.nix b/pkgs/tools/networking/p2p/bittorrent/default.nix index a500cc9d4b4..3894cbd36d4 100644 --- a/pkgs/tools/networking/p2p/bittorrent/default.nix +++ b/pkgs/tools/networking/p2p/bittorrent/default.nix @@ -6,17 +6,17 @@ assert gui -> wxPython != null; stdenv.mkDerivation { - name = "bittorrent-5.0.4"; + name = "bittorrent-5.0.7"; builder = ./builder.sh; src = fetchurl { - url = http://download.bittorrent.com/dl/BitTorrent-5.0.4.tar.gz; - md5 = "3f6a1093102541e88a16d6c1c62e8bcc"; + url = http://download.bittorrent.com/dl/BitTorrent-5.0.7.tar.gz; + sha256 = "09m2qlhzbc6j1hf6fniri0hh6cy6ccgwi2sph65bpjrc417l94gj"; }; buildInputs = [python pycrypto twisted] ++ (if gui then [wxPython] else []); - + inherit makeWrapper; meta = { diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 0bf68e75ac2..0eb631861e1 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -249,7 +249,8 @@ rec { }; bittorrent = import ../tools/networking/p2p/bittorrent { - inherit fetchurl stdenv makeWrapper python wxPython pycrypto twisted; + inherit fetchurl stdenv makeWrapper python pycrypto twisted; + wxPython = wxPython26; gui = true; }; @@ -1707,6 +1708,12 @@ rec { inherit (xlibs) libXinerama; }; + wxGTK28 = import ../development/libraries/wxGTK-2.8 { + inherit fetchurl stdenv pkgconfig; + inherit (gtkLibs) gtk; + inherit (xlibs) libXinerama libSM libXxf86vm xf86vidmodeproto; + }; + Xaw3d = import ../development/libraries/Xaw3d { inherit fetchurl stdenv x11 bison; flex = flex2533; @@ -2083,8 +2090,16 @@ rec { inherit (gtkLibs) glib gtk; }; - wxPython = import ../development/python-modules/wxPython { - inherit fetchurl stdenv pkgconfig wxGTK python; + wxPython = wxPython26; + + wxPython26 = import ../development/python-modules/wxPython/2.6.nix { + inherit fetchurl stdenv pkgconfig python; + wxGTK = wxGTK26; + }; + + wxPython28 = import ../development/python-modules/wxPython/2.8.nix { + inherit fetchurl stdenv pkgconfig python; + wxGTK = wxGTK28; }; twisted = import ../development/python-modules/twisted {