python3Packages.wxpython_4_0: fix darwin build

This commit is contained in:
fricklerhandwerk 2021-01-14 09:25:45 +01:00
parent 27830c70b1
commit a0c2948861
2 changed files with 21 additions and 4 deletions

View File

@ -9,10 +9,18 @@
, python
, doxygen
, ncurses
, wxGTK
, libintl
, numpy
, pillow
, six
, wxGTK
, wxmac
, IOKit
, Carbon
, Cocoa
, AudioToolbox
, OpenGL
, CoreFoundation
}:
buildPythonPackage rec {
@ -26,8 +34,16 @@ buildPythonPackage rec {
doCheck = false;
nativeBuildInputs = [ pkgconfig which doxygen wxGTK ];
buildInputs = [ ncurses wxGTK.gtk ];
nativeBuildInputs = [ pkgconfig which doxygen ]
++ (if stdenv.isDarwin then [ wxmac ] else [ wxGTK ]);
buildInputs = [ ncurses libintl ]
++ (if stdenv.isDarwin
then
[ AudioToolbox Carbon Cocoa CoreFoundation IOKit OpenGL ]
else
[ wxGTK.gtk ]
);
DOXYGEN = "${doxygen}/bin/doxygen";
@ -50,7 +66,7 @@ buildPythonPackage rec {
${python.interpreter} setup.py install --skip-build --prefix=$out
'';
passthru = { inherit wxGTK; };
passthru = { wxWidgets = if stdenv.isDarwin then wxmac else wxGTK; };
meta = {

View File

@ -8121,6 +8121,7 @@ in {
wxPython_4_0 = callPackage ../development/python-modules/wxPython/4.0.nix {
inherit (pkgs) pkgconfig;
inherit (pkgs.darwin.apple_sdk.frameworks) AudioToolbox Carbon Cocoa CoreFoundation IOKit OpenGL;
wxGTK = pkgs.wxGTK30.override {
withGtk2 = false;
withWebKit = true;