1{ stdenv, fetchurl, pkgconfig, python, buildPythonPackage, isPy3k, isPyPy, wxGTK, openglSupport ? true, pyopengl
2, version, sha256, ...
3}:
4
5assert wxGTK.unicode;
6
7buildPythonPackage rec {
8
9 disabled = isPy3k || isPyPy;
10 doCheck = false;
11
12 name = "wxPython-${version}";
13 inherit version;
14
15 src = fetchurl {
16 url = "mirror://sourceforge/wxpython/wxPython-src-${version}.tar.bz2";
17 inherit sha256;
18 };
19
20 buildInputs = [ pkgconfig wxGTK (wxGTK.gtk) ]
21 ++ stdenv.lib.optional openglSupport pyopengl;
22
23 preConfigure = "cd wxPython";
24
25 setupPyBuildFlags = [ "WXPORT=gtk2" "NO_HEADERS=1" "BUILD_GLCANVAS=${if openglSupport then "1" else "0"}" "UNICODE=1" ];
26
27 installPhase = ''
28 ${python}/bin/${python.executable} setup.py ${stdenv.lib.concatStringsSep " " setupPyBuildFlags} install --prefix=$out
29 '';
30
31 passthru = { inherit wxGTK openglSupport; };
32}