python3Packages.wxPython_4_2: init at 4.2.0

This commit is contained in:
Martin Weinelt 2022-09-13 12:36:41 +02:00
parent c4c7f4d700
commit 838cdc7560
No known key found for this signature in database
GPG Key ID: 87C1E9888F856759
3 changed files with 158 additions and 0 deletions

View File

@ -0,0 +1,18 @@
diff --git a/wx/lib/wxcairo/wx_pycairo.py b/wx/lib/wxcairo/wx_pycairo.py
index 7cfe3071..24d1120f 100644
--- a/wx/lib/wxcairo/wx_pycairo.py
+++ b/wx/lib/wxcairo/wx_pycairo.py
@@ -197,7 +197,12 @@ def _findCairoLib():
# For other DLLs we'll just use a dictionary to track them, as there
# probably isn't any need to use them outside of this module.
-_dlls = dict()
+_dlls = {
+ "gdk": ctypes.CDLL("@libgdk@"),
+ "pangocairo": ctypes.CDLL("@libpangocairo@"),
+ "cairoLib": ctypes.CDLL("@libcairo@"),
+ "appsvc": ctypes.CDLL(None),
+}
def _findHelper(names, key, msg):
dll = _dlls.get(key, None)

View File

@ -0,0 +1,133 @@
{ lib
, stdenv
, buildPythonPackage
, pythonOlder
, 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
}:
buildPythonPackage rec {
pname = "wxPython";
version = "4.2.0";
format = "other";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-ZjzrxFCdfl0RNRiGX+J093+VQ0xdV7w4btWNZc7thsc=";
};
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
SDL
sip
which
wxGTK
] ++ 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
];
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"
${python.interpreter} build.py -v --use_syswx dox etg sip --nodoc build_py
runHook postBuild
'';
installPhase = ''
runHook preInstall
${python.interpreter} setup.py install --skip-build --prefix=$out
wrapPythonPrograms
runHook postInstall
'';
checkPhase = ''
runHook preCheck
${python.interpreter} build.py -v test
runHook postCheck
'';
meta = with lib; {
description = "Cross platform GUI toolkit for Python, Phoenix version";
homepage = "http://wxpython.org/";
license = licenses.wxWindows;
maintainers = with maintainers; [ hexa ];
};
}

View File

@ -11899,6 +11899,13 @@ in {
};
};
wxPython_4_2 = callPackage ../development/python-modules/wxPython/4.2.nix {
wxGTK = pkgs.wxGTK32.override {
withWebKit = true;
};
};
x11_hash = callPackage ../development/python-modules/x11_hash { };
x256 = callPackage ../development/python-modules/x256 { };