2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
buildPythonPackage,
|
|
|
|
setuptools,
|
|
|
|
pythonAtLeast,
|
|
|
|
fetchPypi,
|
|
|
|
substituteAll,
|
|
|
|
|
|
|
|
# build
|
|
|
|
autoPatchelfHook,
|
|
|
|
attrdict,
|
|
|
|
doxygen,
|
|
|
|
pkg-config,
|
|
|
|
python,
|
|
|
|
sip,
|
|
|
|
which,
|
|
|
|
|
|
|
|
# runtime
|
|
|
|
cairo,
|
|
|
|
gst_all_1,
|
|
|
|
gtk3,
|
|
|
|
libGL,
|
|
|
|
libGLU,
|
|
|
|
libSM,
|
|
|
|
libXinerama,
|
|
|
|
libXtst,
|
|
|
|
libXxf86vm,
|
|
|
|
libglvnd,
|
|
|
|
mesa,
|
|
|
|
pango,
|
|
|
|
SDL,
|
|
|
|
webkitgtk,
|
|
|
|
wxGTK,
|
|
|
|
xorgproto,
|
|
|
|
|
|
|
|
# propagates
|
|
|
|
numpy,
|
|
|
|
pillow,
|
|
|
|
six,
|
2022-10-30 15:09:59 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2024-01-13 08:15:51 +00:00
|
|
|
pname = "wxpython";
|
2023-07-15 17:15:38 +00:00
|
|
|
version = "4.2.1";
|
2022-10-30 15:09:59 +00:00
|
|
|
format = "other";
|
2024-05-15 15:35:15 +00:00
|
|
|
disabled = pythonAtLeast "3.12";
|
2022-10-30 15:09:59 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
2024-01-13 08:15:51 +00:00
|
|
|
pname = "wxPython";
|
|
|
|
inherit version;
|
2023-07-15 17:15:38 +00:00
|
|
|
hash = "sha256-5I3iEaZga/By7D+neHcda3RsALf0uXDrWHKN31bRPVw=";
|
2022-10-30 15:09:59 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
(substituteAll {
|
|
|
|
src = ./4.2-ctypes.patch;
|
|
|
|
libgdk = "${gtk3.out}/lib/libgdk-3.so";
|
|
|
|
libpangocairo = "${pango}/lib/libpangocairo-1.0.so";
|
|
|
|
libcairo = "${cairo}/lib/libcairo.so";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
attrdict
|
|
|
|
pkg-config
|
|
|
|
setuptools
|
|
|
|
SDL
|
|
|
|
sip
|
|
|
|
which
|
|
|
|
wxGTK
|
2024-06-05 15:53:02 +00:00
|
|
|
] ++ lib.optionals stdenv.isLinux [ autoPatchelfHook ];
|
|
|
|
|
|
|
|
buildInputs =
|
|
|
|
[
|
|
|
|
wxGTK
|
|
|
|
SDL
|
|
|
|
]
|
|
|
|
++ lib.optionals stdenv.isLinux [
|
|
|
|
gst_all_1.gst-plugins-base
|
|
|
|
gst_all_1.gstreamer
|
|
|
|
libGL
|
|
|
|
libGLU
|
|
|
|
libSM
|
|
|
|
libXinerama
|
|
|
|
libXtst
|
|
|
|
libXxf86vm
|
|
|
|
libglvnd
|
|
|
|
mesa
|
|
|
|
webkitgtk
|
|
|
|
xorgproto
|
|
|
|
];
|
2022-10-30 15:09:59 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
numpy
|
|
|
|
pillow
|
|
|
|
six
|
|
|
|
];
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
runHook preBuild
|
|
|
|
|
|
|
|
export DOXYGEN=${doxygen}/bin/doxygen
|
|
|
|
export PATH="${wxGTK}/bin:$PATH"
|
|
|
|
export SDL_CONFIG="${SDL.dev}/bin/sdl-config"
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
${python.pythonOnBuildForHost.interpreter} build.py -v --use_syswx dox etg sip --nodoc build_py
|
2022-10-30 15:09:59 +00:00
|
|
|
|
|
|
|
runHook postBuild
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
${python.pythonOnBuildForHost.interpreter} setup.py install --skip-build --prefix=$out
|
2022-10-30 15:09:59 +00:00
|
|
|
wrapPythonPrograms
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
runHook preCheck
|
|
|
|
|
|
|
|
${python.interpreter} build.py -v test
|
|
|
|
|
|
|
|
runHook postCheck
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
2023-07-15 17:15:38 +00:00
|
|
|
changelog = "https://github.com/wxWidgets/Phoenix/blob/wxPython-${version}/CHANGES.rst";
|
2022-10-30 15:09:59 +00:00
|
|
|
description = "Cross platform GUI toolkit for Python, Phoenix version";
|
|
|
|
homepage = "http://wxpython.org/";
|
|
|
|
license = licenses.wxWindows;
|
|
|
|
maintainers = with maintainers; [ hexa ];
|
|
|
|
};
|
|
|
|
}
|