Merge pull request #2036 from ambrop72/wxpython3

Add wxPython-3.0 with OpenGL support.
This commit is contained in:
Peter Simons 2014-03-26 11:10:15 +01:00
commit 078f064e9c
3 changed files with 53 additions and 0 deletions

View File

@ -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; };
}

View File

@ -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

View File

@ -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";