2016-05-27 19:25:48 +00:00
|
|
|
{ fetchurl
|
|
|
|
, lib
|
|
|
|
, openglSupport ? true
|
|
|
|
, libX11
|
|
|
|
, wxGTK
|
|
|
|
, pkgconfig
|
2016-10-18 15:57:03 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, pyopengl
|
|
|
|
, isPy3k
|
|
|
|
, isPyPy
|
|
|
|
, python
|
2016-05-27 19:25:48 +00:00
|
|
|
}:
|
2014-03-25 21:32:39 +00:00
|
|
|
|
2016-05-27 19:25:48 +00:00
|
|
|
assert wxGTK.unicode;
|
2014-03-25 21:32:39 +00:00
|
|
|
|
2016-05-27 19:25:48 +00:00
|
|
|
buildPythonPackage rec {
|
|
|
|
name = "wxPython-${version}";
|
2015-09-02 17:40:38 +00:00
|
|
|
version = "3.0.2.0";
|
2014-03-25 21:32:39 +00:00
|
|
|
|
2016-05-27 19:25:48 +00:00
|
|
|
disabled = isPy3k || isPyPy;
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://sourceforge/wxpython/wxPython-src-${version}.tar.bz2";
|
|
|
|
sha256 = "0qfzx3sqx4mwxv99sfybhsij4b5pc03ricl73h4vhkzazgjjjhfm";
|
|
|
|
};
|
|
|
|
|
2016-05-31 14:24:38 +00:00
|
|
|
hardeningDisable = [ "format" ];
|
|
|
|
|
2016-05-27 19:25:48 +00:00
|
|
|
propagatedBuildInputs = [ pkgconfig wxGTK (wxGTK.gtk) libX11 ] ++ lib.optional openglSupport pyopengl;
|
|
|
|
preConfigure = "cd wxPython";
|
|
|
|
|
|
|
|
NIX_LDFLAGS = "-lX11 -lgdk-x11-2.0";
|
|
|
|
|
|
|
|
buildPhase = "";
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
${python.interpreter} setup.py install WXPORT=gtk2 NO_HEADERS=1 BUILD_GLCANVAS=${if openglSupport then "1" else "0"} UNICODE=1 --prefix=$out
|
|
|
|
wrapPythonPrograms
|
|
|
|
'';
|
2014-03-25 21:32:39 +00:00
|
|
|
|
2016-05-27 19:25:48 +00:00
|
|
|
passthru = { inherit wxGTK openglSupport; };
|
|
|
|
}
|