2015-11-20 07:34:24 +00:00
|
|
|
{ stdenv, fetchurl, pkgconfig, python, isPy3k, isPyPy, wxGTK, openglSupport ? true, pyopengl
|
|
|
|
, version, sha256, wrapPython, setuptools, ...
|
2015-09-05 11:58:00 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
assert wxGTK.unicode;
|
|
|
|
|
2015-11-20 07:34:24 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "wxPython-${version}";
|
|
|
|
inherit version;
|
2015-09-05 11:58:00 +01:00
|
|
|
|
|
|
|
disabled = isPy3k || isPyPy;
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://sourceforge/wxpython/wxPython-src-${version}.tar.bz2";
|
|
|
|
inherit sha256;
|
|
|
|
};
|
|
|
|
|
2015-11-20 07:34:24 +00:00
|
|
|
pythonPath = [ python setuptools ];
|
|
|
|
buildInputs = [ python setuptools pkgconfig wxGTK (wxGTK.gtk) wrapPython ] ++ stdenv.lib.optional openglSupport pyopengl;
|
2015-09-05 11:58:00 +01:00
|
|
|
preConfigure = "cd wxPython";
|
|
|
|
|
|
|
|
installPhase = ''
|
2015-11-20 07:34:24 +00:00
|
|
|
${python.interpreter} setup.py install WXPORT=gtk2 NO_HEADERS=1 BUILD_GLCANVAS=${if openglSupport then "1" else "0"} UNICODE=1 --prefix=$out
|
|
|
|
wrapPythonPrograms
|
2015-09-05 11:58:00 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
passthru = { inherit wxGTK openglSupport; };
|
|
|
|
}
|