diff --git a/pkgs/applications/science/robotics/mavproxy/default.nix b/pkgs/applications/science/robotics/mavproxy/default.nix index 8e7c5bddd961..22a32f89bded 100644 --- a/pkgs/applications/science/robotics/mavproxy/default.nix +++ b/pkgs/applications/science/robotics/mavproxy/default.nix @@ -1,5 +1,5 @@ -{ lib, buildPythonApplication, fetchPypi, matplotlib, numpy, pymavlink, pyserial -, setuptools, wxPython_4_0 }: +{ stdenv, lib, buildPythonApplication, fetchPypi, matplotlib, numpy, pymavlink, pyserial +, setuptools, wxPython_4_0, billiard, gnureadline }: buildPythonApplication rec { pname = "MAVProxy"; @@ -10,6 +10,11 @@ buildPythonApplication rec { sha256 = "fe046481b793b592334749249620fce8a463f4c46b394ff744645975465d677b"; }; + postPatch = '' + substituteInPlace setup.py \ + --replace "opencv-python" "" + ''; + propagatedBuildInputs = [ matplotlib numpy @@ -17,7 +22,7 @@ buildPythonApplication rec { pyserial setuptools wxPython_4_0 - ]; + ] ++ lib.optionals stdenv.isDarwin [ billiard gnureadline ]; # No tests doCheck = false; diff --git a/pkgs/development/libraries/wxwidgets/3.0/mac.nix b/pkgs/development/libraries/wxwidgets/3.0/mac.nix index 1b4c67024515..a6973f53de8f 100644 --- a/pkgs/development/libraries/wxwidgets/3.0/mac.nix +++ b/pkgs/development/libraries/wxwidgets/3.0/mac.nix @@ -1,11 +1,11 @@ { stdenv, fetchzip, expat, libiconv, libjpeg, libpng, libtiff, zlib # darwin only attributes , derez, rez, setfile -, AGL, Cocoa, Kernel +, AGL, Cocoa, Kernel, WebKit }: stdenv.mkDerivation rec { - version = "3.0.4"; + version = "3.0.5.1"; pname = "wxmac"; src = fetchzip { @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { buildInputs = [ expat libiconv libjpeg libpng libtiff zlib derez rez setfile - AGL Cocoa Kernel + AGL Cocoa Kernel WebKit ]; postPatch = '' diff --git a/pkgs/development/python-modules/wxPython/4.0.nix b/pkgs/development/python-modules/wxPython/4.0.nix index 406493362c46..a1cee317e345 100644 --- a/pkgs/development/python-modules/wxPython/4.0.nix +++ b/pkgs/development/python-modules/wxPython/4.0.nix @@ -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 = { diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8c19c41a4e35..79c93abe86f5 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -17090,7 +17090,7 @@ in }; 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; }; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index f902e97dbc39..b56d493df39b 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -8143,6 +8143,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;