2020-11-12 09:05:59 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchPypi
|
|
|
|
, buildPythonPackage
|
|
|
|
, which
|
2021-02-05 17:12:51 +00:00
|
|
|
, pkg-config
|
2020-11-12 09:05:59 +00:00
|
|
|
, python
|
|
|
|
, isPy27
|
|
|
|
, doxygen
|
|
|
|
, cairo
|
|
|
|
, ncurses
|
|
|
|
, pango
|
|
|
|
, wxGTK
|
2021-06-28 23:13:55 +00:00
|
|
|
, pillow
|
|
|
|
, numpy
|
2022-02-20 05:27:41 +00:00
|
|
|
, libXinerama
|
|
|
|
, libSM
|
|
|
|
, libXxf86vm
|
|
|
|
, libXtst
|
|
|
|
, libGLU
|
|
|
|
, libGL
|
|
|
|
, xorgproto
|
|
|
|
, gst_all_1
|
|
|
|
, libglvnd
|
|
|
|
, mesa
|
|
|
|
, webkitgtk
|
|
|
|
, autoPatchelfHook
|
2020-11-12 09:05:59 +00:00
|
|
|
}:
|
|
|
|
let
|
|
|
|
dynamic-linker = stdenv.cc.bintools.dynamicLinker;
|
|
|
|
in
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "wxPython";
|
2022-02-20 05:27:41 +00:00
|
|
|
version = "4.1.1";
|
2020-11-12 09:05:59 +00:00
|
|
|
disabled = isPy27;
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-02-20 05:27:41 +00:00
|
|
|
sha256 = "0a1mdhdkda64lnwm1dg0dlrf9rs4gkal3lra6hpqbwn718cf7r80";
|
2020-11-12 09:05:59 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# https://github.com/NixOS/nixpkgs/issues/75759
|
|
|
|
# https://github.com/wxWidgets/Phoenix/issues/1316
|
|
|
|
doCheck = false;
|
|
|
|
|
2022-02-20 05:27:41 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
which
|
|
|
|
doxygen
|
|
|
|
wxGTK.gtk
|
|
|
|
pkg-config
|
2022-04-27 09:35:20 +00:00
|
|
|
] ++ lib.optionals stdenv.isLinux [
|
2022-02-20 05:27:41 +00:00
|
|
|
autoPatchelfHook
|
|
|
|
];
|
2020-11-12 09:05:59 +00:00
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
wxGTK.gtk
|
|
|
|
ncurses
|
2022-04-27 09:35:20 +00:00
|
|
|
] ++ lib.optionals stdenv.isLinux [
|
2022-02-20 05:27:41 +00:00
|
|
|
libXinerama
|
|
|
|
libSM
|
|
|
|
libXxf86vm
|
|
|
|
libXtst
|
|
|
|
xorgproto
|
|
|
|
gst_all_1.gstreamer
|
|
|
|
gst_all_1.gst-plugins-base
|
|
|
|
libGLU
|
|
|
|
libGL
|
|
|
|
libglvnd
|
|
|
|
mesa
|
|
|
|
webkitgtk
|
2020-11-12 09:05:59 +00:00
|
|
|
];
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
propagatedBuildInputs = [ pillow numpy ];
|
|
|
|
|
2020-11-12 09:05:59 +00:00
|
|
|
DOXYGEN = "${doxygen}/bin/doxygen";
|
|
|
|
|
|
|
|
preConfigure = lib.optionalString (!stdenv.isDarwin) ''
|
|
|
|
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-3.0.so"),
|
|
|
|
("pangocairo", "${pango.out}/lib/libpangocairo-1.0.so"),
|
2022-02-20 05:27:41 +00:00
|
|
|
("cairoLib = None", "cairoLib = ctypes.CDLL('${cairo}/lib/libcairo.so')"),
|
2020-11-12 09:05:59 +00:00
|
|
|
("appsvc", None)
|
|
|
|
]}'
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildPhase = ''
|
2022-02-20 05:27:41 +00:00
|
|
|
${python.interpreter} build.py -v build_wx dox etg --nodoc sip build_py
|
2020-11-12 09:05:59 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
${python.interpreter} setup.py install --skip-build --prefix=$out
|
|
|
|
wrapPythonPrograms
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Cross platform GUI toolkit for Python, Phoenix version";
|
|
|
|
homepage = "http://wxpython.org/";
|
|
|
|
license = licenses.wxWindows;
|
|
|
|
maintainers = with maintainers; [ tfmoraes ];
|
|
|
|
};
|
|
|
|
}
|