2015-09-02 19:40:38 +02:00
|
|
|
{ stdenv, fetchurl, pkgconfig, python, buildPythonPackage, isPy3k, isPyPy, wxGTK, openglSupport ? true, pyopengl }:
|
2014-03-25 22:32:39 +01:00
|
|
|
|
|
|
|
assert wxGTK.unicode;
|
|
|
|
|
2015-09-02 19:40:38 +02:00
|
|
|
buildPythonPackage rec {
|
2014-03-25 22:32:39 +01:00
|
|
|
|
2015-09-02 19:40:38 +02:00
|
|
|
disabled = isPy3k || isPyPy;
|
|
|
|
doCheck = false;
|
2014-03-25 22:32:39 +01:00
|
|
|
|
2015-09-02 19:40:38 +02:00
|
|
|
version = "3.0.2.0";
|
2014-03-25 22:32:39 +01:00
|
|
|
name = "wxPython-${version}";
|
2015-09-02 19:40:38 +02:00
|
|
|
|
2014-03-25 22:32:39 +01:00
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://sourceforge/wxpython/wxPython-src-${version}.tar.bz2";
|
2015-08-15 10:03:12 +02:00
|
|
|
sha256 = "0qfzx3sqx4mwxv99sfybhsij4b5pc03ricl73h4vhkzazgjjjhfm";
|
2014-03-25 22:32:39 +01:00
|
|
|
};
|
2015-09-02 19:40:38 +02:00
|
|
|
|
|
|
|
buildInputs = [ pkgconfig wxGTK (wxGTK.gtk) ]
|
|
|
|
++ stdenv.lib.optional openglSupport pyopengl;
|
|
|
|
|
|
|
|
preConfigure = "cd wxPython";
|
|
|
|
|
|
|
|
setupPyBuildFlags = [ "WXPORT=gtk2" "NO_HEADERS=1" "BUILD_GLCANVAS=${if openglSupport then "1" else "0"}" "UNICODE=1" ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
${python}/bin/${python.executable} setup.py ${stdenv.lib.concatStringsSep " " setupPyBuildFlags} install --prefix=$out
|
|
|
|
'';
|
2014-03-25 22:32:39 +01:00
|
|
|
|
|
|
|
inherit openglSupport;
|
|
|
|
|
|
|
|
passthru = { inherit wxGTK openglSupport; };
|
2015-08-15 10:03:12 +02:00
|
|
|
}
|