diff --git a/pkgs/development/libraries/qt-5/5.12/default.nix b/pkgs/development/libraries/qt-5/5.12/default.nix index 2800f2d7797..8d27f3a0d4b 100644 --- a/pkgs/development/libraries/qt-5/5.12/default.nix +++ b/pkgs/development/libraries/qt-5/5.12/default.nix @@ -54,6 +54,7 @@ let optionals stdenv.isDarwin [ ./qtbase.patch.d/0001-qtbase-mkspecs-mac.patch ./qtbase.patch.d/0002-qtbase-mac.patch + ./qtbase.patch.d/0013-define-kiosurfacesuccess.patch ] ++ [ ./qtbase.patch.d/0003-qtbase-mkspecs.patch diff --git a/pkgs/development/libraries/qt-5/5.12/qtbase.patch.d/0013-define-kiosurfacesuccess.patch b/pkgs/development/libraries/qt-5/5.12/qtbase.patch.d/0013-define-kiosurfacesuccess.patch new file mode 100644 index 00000000000..a43a46d8a69 --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.12/qtbase.patch.d/0013-define-kiosurfacesuccess.patch @@ -0,0 +1,16 @@ +diff --git a/src/plugins/platforms/cocoa/qiosurfacegraphicsbuffer.mm b/src/plugins/platforms/cocoa/qiosurfacegraphicsbuffer.mm +index a367487e..c3aeca1d 100644 +--- a/src/plugins/platforms/cocoa/qiosurfacegraphicsbuffer.mm ++++ b/src/plugins/platforms/cocoa/qiosurfacegraphicsbuffer.mm +@@ -49,6 +49,11 @@ + // but was only added in the 10.14 SDK, so declare it just in case. + extern "C" CFPropertyListRef CGColorSpaceCopyPropertyList(CGColorSpaceRef space); + ++// Introduced in 10.13: http://codeworkshop.net/objc-diff/sdkdiffs/macos/10.13/IOSurface.html ++#if !defined(kIOSurfaceSuccess) ++#define kIOSurfaceSuccess KERN_SUCCESS ++#endif ++ + QT_BEGIN_NAMESPACE + + Q_LOGGING_CATEGORY(lcQpaIOSurface, "qt.qpa.backingstore.iosurface"); diff --git a/pkgs/development/libraries/qt-5/modules/qtbase.nix b/pkgs/development/libraries/qt-5/modules/qtbase.nix index d1ec209c95d..3dbdb2a9770 100644 --- a/pkgs/development/libraries/qt-5/modules/qtbase.nix +++ b/pkgs/development/libraries/qt-5/modules/qtbase.nix @@ -58,7 +58,7 @@ stdenv.mkDerivation { # TODO: move to buildInputs, this should not be propagated. AGL AppKit ApplicationServices Carbon Cocoa CoreAudio CoreBluetooth CoreLocation CoreServices DiskArbitration Foundation OpenGL - darwin.libobjc libiconv MetalKit + darwin.libobjc libiconv MetalKit IOKit ] else [