Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wxPython: 4.1.0 -> 4.1.1 #135607

Merged
merged 1 commit into from
Feb 20, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 35 additions & 13 deletions pkgs/development/python-modules/wxPython/4.1.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,62 +13,84 @@
, wxGTK
, pillow
, numpy
, libXinerama
, libSM
, libXxf86vm
, libXtst
, libGLU
, libGL
, xorgproto
, gst_all_1
, libglvnd
, mesa
, webkitgtk
, autoPatchelfHook
}:
let
dynamic-linker = stdenv.cc.bintools.dynamicLinker;
in
buildPythonPackage rec {
pname = "wxPython";
version = "4.1.0";
version = "4.1.1";
disabled = isPy27;

src = fetchPypi {
inherit pname version;
sha256 = "12x4ci5q7qni4rkfiq6lnpn1fk8b0sfc6dck5wyxkj2sfp5pa91f";
sha256 = "0a1mdhdkda64lnwm1dg0dlrf9rs4gkal3lra6hpqbwn718cf7r80";
};

# https://github.com/NixOS/nixpkgs/issues/75759
# https://github.com/wxWidgets/Phoenix/issues/1316
doCheck = false;

nativeBuildInputs = [ which doxygen wxGTK pkg-config ];
nativeBuildInputs = [
which
doxygen
wxGTK.gtk
pkg-config
autoPatchelfHook
];

buildInputs = [
wxGTK.gtk
ncurses
libXinerama
libSM
libXxf86vm
libXtst
xorgproto
gst_all_1.gstreamer
gst_all_1.gst-plugins-base
libGLU
libGL
libglvnd
mesa
webkitgtk
];

propagatedBuildInputs = [ pillow numpy ];

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-3.0.so"),
("pangocairo", "${pango.out}/lib/libpangocairo-1.0.so"),
("cairoLib = None", "cairoLib = ctypes.CDLL('${cairo}/lib/libcairo.so')"),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This part does not seem to be correct — the text ends up being included in the Python code, while the original suggestion was to add a pair of arguments to substituteInPlace, so that one call will perform two replacements in separate parts of the same file.

("appsvc", None)
]}'

# https://github.com/wxWidgets/Phoenix/pull/1584
# It'll be not needed in next version because https://github.com/wxWidgets/Phoenix/pull/1699
substituteInPlace build.py --replace "os.environ['PYTHONPATH'] = phoenixDir()" \
"os.environ['PYTHONPATH'] = os.environ['PYTHONPATH'] + os.pathsep + phoenixDir()"
'';

buildPhase = ''
${python.interpreter} build.py -v --use_syswx dox etg --nodoc build_py
${python.interpreter} build.py -v build_wx dox etg --nodoc sip build_py
'';

installPhase = ''
${python.interpreter} setup.py install --skip-build --prefix=$out
wrapPythonPrograms
'';

passthru = { inherit wxGTK; };

meta = with lib; {
description = "Cross platform GUI toolkit for Python, Phoenix version";
homepage = "http://wxpython.org/";
Expand Down