From 0905e5e23affddfe1857a41266e336926bfec546 Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Sat, 10 Feb 2018 01:04:56 +0100 Subject: [PATCH] qt59-qtbase: fix darwin build --- .../libraries/qt-5/5.9/default.nix | 2 +- .../libraries/qt-5/5.9/qtbase-darwin.patch | 35 +++++++++++++++++++ 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 pkgs/development/libraries/qt-5/5.9/qtbase-darwin.patch diff --git a/pkgs/development/libraries/qt-5/5.9/default.nix b/pkgs/development/libraries/qt-5/5.9/default.nix index 9afa818c36e3..e0dab3421627 100644 --- a/pkgs/development/libraries/qt-5/5.9/default.nix +++ b/pkgs/development/libraries/qt-5/5.9/default.nix @@ -37,7 +37,7 @@ let srcs = import ./srcs.nix { inherit fetchurl; inherit mirror; }; patches = { - qtbase = [ ./qtbase.patch ]; + qtbase = [ ./qtbase.patch ] ++ optional stdenv.isDarwin ./qtbase-darwin.patch; qtdeclarative = [ ./qtdeclarative.patch ]; qtscript = [ ./qtscript.patch ]; qtserialport = [ ./qtserialport.patch ]; diff --git a/pkgs/development/libraries/qt-5/5.9/qtbase-darwin.patch b/pkgs/development/libraries/qt-5/5.9/qtbase-darwin.patch new file mode 100644 index 000000000000..875fba12e2fb --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.9/qtbase-darwin.patch @@ -0,0 +1,35 @@ +diff --git a/src/plugins/bearer/corewlan/qcorewlanengine.mm b/src/plugins/bearer/corewlan/qcorewlanengine.mm +index 341d3bc..3368234 100644 +--- a/src/plugins/bearer/corewlan/qcorewlanengine.mm ++++ b/src/plugins/bearer/corewlan/qcorewlanengine.mm +@@ -287,7 +287,7 @@ void QScanThread::getUserConfigurations() + QMacAutoReleasePool pool; + userProfiles.clear(); + +- NSArray *wifiInterfaces = [CWWiFiClient interfaceNames]; ++ NSArray *wifiInterfaces = [CWWiFiClient interfaceNames]; + for (NSString *ifName in wifiInterfaces) { + + CWInterface *wifiInterface = [[CWWiFiClient sharedWiFiClient] interfaceWithName:ifName]; +@@ -602,7 +602,7 @@ void QCoreWlanEngine::doRequestUpdate() + + QMacAutoReleasePool pool; + +- NSArray *wifiInterfaces = [CWWiFiClient interfaceNames]; ++ NSArray *wifiInterfaces = [CWWiFiClient interfaceNames]; + for (NSString *ifName in wifiInterfaces) { + scanThread->interfaceName = QString::fromNSString(ifName); + scanThread->start(); +diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm +index 5cd4beb..84919e6 100644 +--- a/src/plugins/platforms/cocoa/qcocoawindow.mm ++++ b/src/plugins/platforms/cocoa/qcocoawindow.mm +@@ -320,7 +320,7 @@ static void qt_closePopups() + + (void)applicationActivationChanged:(NSNotification*)notification + { + const id sender = self; +- NSEnumerator *windowEnumerator = nullptr; ++ NSEnumerator *windowEnumerator = nullptr; + NSApplication *application = [NSApplication sharedApplication]; + + #if QT_MACOS_PLATFORM_SDK_EQUAL_OR_ABOVE(__MAC_10_12)