diff --git a/pkgs/development/python-modules/wxPython/3.0.nix b/pkgs/development/python-modules/wxPython/3.0.nix new file mode 100644 index 000000000000..9aa6148643bd --- /dev/null +++ b/pkgs/development/python-modules/wxPython/3.0.nix @@ -0,0 +1,25 @@ +{ stdenv, fetchurl, pkgconfig, wxGTK, pythonPackages, openglSupport ? true }: + +assert wxGTK.unicode; + +with stdenv.lib; + +let version = "3.0.0.0"; in + +stdenv.mkDerivation { + name = "wxPython-${version}"; + + builder = ./builder3.0.sh; + + src = fetchurl { + url = "mirror://sourceforge/wxpython/wxPython-src-${version}.tar.bz2"; + sha256 = "af88695e820dd914e8375dc91ecb736f6fb605979bb38460ace61bbea494dc11"; + }; + + buildInputs = [ pkgconfig wxGTK (wxGTK.gtk) pythonPackages.python pythonPackages.wrapPython ] + ++ optional openglSupport pythonPackages.pyopengl; + + inherit openglSupport; + + passthru = { inherit wxGTK openglSupport; }; +} diff --git a/pkgs/development/python-modules/wxPython/builder3.0.sh b/pkgs/development/python-modules/wxPython/builder3.0.sh new file mode 100644 index 000000000000..7403c67d0912 --- /dev/null +++ b/pkgs/development/python-modules/wxPython/builder3.0.sh @@ -0,0 +1,22 @@ +source $stdenv/setup + +flags="WXPORT=gtk2 NO_HEADERS=1 BUILD_GLCANVAS=${openglSupport?1:0} UNICODE=1" + +configurePhase() { + cd wxPython +} + +buildPhase() { + python setup.py $flags build +} + +installPhase() { + python setup.py $flags install --prefix=$out + + # Ugly workaround for Nixpkgs/111. + ln -s $out/lib/python*/site-packages/wx-*-gtk2-unicode/* $out/lib/python*/site-packages + + wrapPythonPrograms +} + +genericBuild diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index dd7d187693c3..cfa792a21d19 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7610,6 +7610,12 @@ rec { wxGTK = pkgs.wxGTK28; }; + wxPython30 = import ../development/python-modules/wxPython/3.0.nix { + inherit (pkgs) stdenv fetchurl pkgconfig; + inherit pythonPackages; + wxGTK = pkgs.wxGTK30; + }; + xe = buildPythonPackage rec { url = "http://www.blarg.net/%7Esteveha/xe-0.7.4.tar.gz"; name = stdenv.lib.nameFromURL url ".tar";