Merge pull request #97101 from fricklerhandwerk/wxpython

This commit is contained in:
Sandro 2021-01-15 10:30:05 +01:00 committed by GitHub
commit 403ea9f27c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 33 additions and 11 deletions

View File

@ -1,5 +1,5 @@
{ lib, buildPythonApplication, fetchPypi, matplotlib, numpy, pymavlink, pyserial { stdenv, lib, buildPythonApplication, fetchPypi, matplotlib, numpy, pymavlink, pyserial
, setuptools, wxPython_4_0 }: , setuptools, wxPython_4_0, billiard, gnureadline }:
buildPythonApplication rec { buildPythonApplication rec {
pname = "MAVProxy"; pname = "MAVProxy";
@ -10,6 +10,11 @@ buildPythonApplication rec {
sha256 = "fe046481b793b592334749249620fce8a463f4c46b394ff744645975465d677b"; sha256 = "fe046481b793b592334749249620fce8a463f4c46b394ff744645975465d677b";
}; };
postPatch = ''
substituteInPlace setup.py \
--replace "opencv-python" ""
'';
propagatedBuildInputs = [ propagatedBuildInputs = [
matplotlib matplotlib
numpy numpy
@ -17,7 +22,7 @@ buildPythonApplication rec {
pyserial pyserial
setuptools setuptools
wxPython_4_0 wxPython_4_0
]; ] ++ lib.optionals stdenv.isDarwin [ billiard gnureadline ];
# No tests # No tests
doCheck = false; doCheck = false;

View File

@ -1,11 +1,11 @@
{ stdenv, fetchzip, expat, libiconv, libjpeg, libpng, libtiff, zlib { stdenv, fetchzip, expat, libiconv, libjpeg, libpng, libtiff, zlib
# darwin only attributes # darwin only attributes
, derez, rez, setfile , derez, rez, setfile
, AGL, Cocoa, Kernel , AGL, Cocoa, Kernel, WebKit
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
version = "3.0.4"; version = "3.0.5.1";
pname = "wxmac"; pname = "wxmac";
src = fetchzip { src = fetchzip {
@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
buildInputs = [ buildInputs = [
expat libiconv libjpeg libpng libtiff zlib expat libiconv libjpeg libpng libtiff zlib
derez rez setfile derez rez setfile
AGL Cocoa Kernel AGL Cocoa Kernel WebKit
]; ];
postPatch = '' postPatch = ''

View File

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

View File

@ -17090,7 +17090,7 @@ in
}; };
wxmac = callPackage ../development/libraries/wxwidgets/3.0/mac.nix { wxmac = callPackage ../development/libraries/wxwidgets/3.0/mac.nix {
inherit (darwin.apple_sdk.frameworks) AGL Cocoa Kernel; inherit (darwin.apple_sdk.frameworks) AGL Cocoa Kernel WebKit;
inherit (darwin.stubs) setfile rez derez; inherit (darwin.stubs) setfile rez derez;
}; };

View File

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