Skip to content

Commit

Permalink
wxPython: 4.1.0 -> 4.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
plabadens committed Dec 12, 2021
1 parent f94a250 commit afc7893
Show file tree
Hide file tree
Showing 2 changed files with 102 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkgs/python-modules/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@
obspy = callPackage ./obspy { };

python-validity = callPackage ./python-validity { };

wxPython_4_1 = callPackage ./wxPython_4_1 { };
}
100 changes: 100 additions & 0 deletions pkgs/python-modules/wxPython_4_1/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
{ lib
, stdenv
, fetchPypi
, buildPythonPackage
, which
, pkg-config
, python
, isPy27
, doxygen
, cairo
, ncurses
, pango
, 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.1";
disabled = isPy27;

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

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

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 '_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')"),
("appsvc", None)
]}'
'';

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

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 ];
};
}

0 comments on commit afc7893

Please sign in to comment.