2018-07-21 16:41:48 +01:00
|
|
|
{ lib
|
2019-05-01 23:40:10 +01:00
|
|
|
, stdenv
|
|
|
|
, openglSupport ? true
|
|
|
|
, libX11
|
|
|
|
, pyopengl
|
2018-07-21 16:41:48 +01:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, pkgconfig
|
|
|
|
, libjpeg
|
|
|
|
, libtiff
|
|
|
|
, SDL
|
|
|
|
, gst-plugins-base
|
|
|
|
, libnotify
|
|
|
|
, freeglut
|
|
|
|
, xorg
|
|
|
|
, which
|
2019-05-01 23:40:10 +01:00
|
|
|
, cairo
|
|
|
|
, requests
|
|
|
|
, pango
|
|
|
|
, pathlib2
|
|
|
|
, python
|
|
|
|
, doxygen
|
|
|
|
, ncurses
|
|
|
|
, libpng
|
|
|
|
, gstreamer
|
|
|
|
, wxGTK
|
2018-07-21 16:41:48 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "wxPython";
|
2019-05-30 07:49:54 +01:00
|
|
|
version = "4.0.6";
|
2018-07-21 16:41:48 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2019-05-30 07:49:54 +01:00
|
|
|
sha256 = "35cc8ae9dd5246e2c9861bb796026bbcb9fb083e4d49650f776622171ecdab37";
|
2018-07-21 16:41:48 +01:00
|
|
|
};
|
|
|
|
|
2019-05-01 23:40:10 +01:00
|
|
|
doCheck = false;
|
2018-07-21 16:41:48 +01:00
|
|
|
|
2019-05-01 23:40:10 +01:00
|
|
|
nativeBuildInputs = [ pkgconfig which doxygen wxGTK ];
|
|
|
|
|
|
|
|
buildInputs = [ libjpeg libtiff SDL
|
|
|
|
gst-plugins-base libnotify freeglut xorg.libSM ncurses
|
|
|
|
requests libpng gstreamer libX11
|
|
|
|
pathlib2
|
|
|
|
(wxGTK.gtk)
|
|
|
|
]
|
|
|
|
++ lib.optional openglSupport pyopengl;
|
|
|
|
|
|
|
|
hardeningDisable = [ "format" ];
|
|
|
|
|
|
|
|
DOXYGEN = "${doxygen}/bin/doxygen";
|
|
|
|
|
|
|
|
preConfigure = lib.optionalString (!stdenv.isDarwin) ''
|
|
|
|
substituteInPlace wx/lib/wxcairo/wx_pycairo.py \
|
|
|
|
--replace 'cairoLib = None' 'cairoLib = ctypes.CDLL("${cairo}/lib/libcairo.so")'
|
|
|
|
substituteInPlace wx/lib/wxcairo/wx_pycairo.py \
|
|
|
|
--replace '_dlls = dict()' '_dlls = {k: ctypes.CDLL(v) for k, v in [
|
|
|
|
("gdk", "${wxGTK.gtk}/lib/libgtk-x11-2.0.so"),
|
|
|
|
("pangocairo", "${pango.out}/lib/libpangocairo-1.0.so"),
|
|
|
|
("appsvc", None)
|
|
|
|
]}'
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
${python.interpreter} build.py -v --use_syswx dox etg --nodoc sip build_py
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
${python.interpreter} setup.py install --skip-build --prefix=$out
|
|
|
|
wrapPythonPrograms
|
|
|
|
'';
|
|
|
|
|
|
|
|
passthru = { inherit wxGTK openglSupport; };
|
2018-07-21 16:41:48 +01:00
|
|
|
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Cross platform GUI toolkit for Python, Phoenix version";
|
|
|
|
homepage = http://wxpython.org/;
|
|
|
|
license = lib.licenses.wxWindows;
|
|
|
|
};
|
|
|
|
|
2019-05-01 23:40:10 +01:00
|
|
|
}
|