Merge pull request #283514 from mroi/patch-synergy

synergy: fix x86_64-darwin build

authored by Weijia Wang and committed by GitHub 50b52d37 752eb493

+9 -24
-15
pkgs/applications/misc/synergy/darwin-no-UserNotifications-includes.patch
··· 1 - diff --git a/src/gui/src/OSXHelpers.mm b/src/gui/src/OSXHelpers.mm 2 - index 0c98afc1..38c190a6 100644 3 - --- a/src/gui/src/OSXHelpers.mm 4 - +++ b/src/gui/src/OSXHelpers.mm 5 - @@ -20,10 +20,6 @@ 6 - #import <Foundation/Foundation.h> 7 - #import <CoreData/CoreData.h> 8 - #import <Cocoa/Cocoa.h> 9 - -#import <UserNotifications/UNNotification.h> 10 - -#import <UserNotifications/UNUserNotificationCenter.h> 11 - -#import <UserNotifications/UNNotificationContent.h> 12 - -#import <UserNotifications/UNNotificationTrigger.h> 13 - 14 - #import <QtGlobal> 15 -
+7 -8
pkgs/applications/misc/synergy/default.nix
··· 27 27 , avahi-compat 28 28 29 29 # MacOS / darwin 30 - , darwin 31 30 , ApplicationServices 32 31 , Carbon 33 32 , Cocoa 34 33 , CoreServices 35 34 , ScreenSaver 35 + , UserNotifications 36 36 }: 37 37 38 38 stdenv.mkDerivation rec { ··· 50 50 patches = [ 51 51 # Without this OpenSSL from nixpkgs is not detected 52 52 ./darwin-non-static-openssl.patch 53 - ] ++ lib.optionals (stdenv.isDarwin && !(darwin.apple_sdk.frameworks ? UserNotifications)) [ 54 - # We cannot include UserNotifications because of a build failure in the Apple SDK. 55 - # The functions used from it are already implicitly included anyways. 56 - ./darwin-no-UserNotifications-includes.patch 57 53 ]; 58 54 59 55 postPatch = '' ··· 79 75 Cocoa 80 76 CoreServices 81 77 ScreenSaver 82 - ] ++ lib.optionals (stdenv.isDarwin && darwin.apple_sdk.frameworks ? UserNotifications) [ 83 - darwin.apple_sdk.frameworks.UserNotifications 78 + UserNotifications 84 79 ] ++ lib.optionals stdenv.isLinux [ 85 80 util-linux 86 81 libselinux ··· 110 105 111 106 checkPhase = '' 112 107 runHook preCheck 108 + '' + lib.optionalString stdenv.isDarwin '' 109 + # filter out tests failing with sandboxing on darwin 110 + export GTEST_FILTER=-ServerConfigTests.serverconfig_will_deem_equal_configs_with_same_cell_names:NetworkAddress.hostname_valid_parsing 111 + '' + '' 113 112 bin/unittests 114 113 runHook postCheck 115 114 ''; ··· 126 125 cp ../res/synergy.svg $out/share/icons/hicolor/scalable/apps/ 127 126 substitute ../res/synergy.desktop $out/share/applications/synergy.desktop \ 128 127 --replace "/usr/bin" "$out/bin" 129 - '' + lib.optionalString stdenv.isDarwin '' 128 + '' + lib.optionalString (stdenv.isDarwin && withGUI) '' 130 129 mkdir -p $out/Applications 131 130 cp -r bundle/Synergy.app $out/Applications 132 131 ln -s $out/bin $out/Applications/Synergy.app/Contents/MacOS
+2 -1
pkgs/top-level/all-packages.nix
··· 35403 35403 }; 35404 35404 35405 35405 synergy = libsForQt5.callPackage ../applications/misc/synergy { 35406 - inherit (darwin.apple_sdk.frameworks) ApplicationServices Carbon Cocoa CoreServices ScreenSaver; 35406 + stdenv = if stdenv.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv; 35407 + inherit (darwin.apple_sdk_11_0.frameworks) ApplicationServices Carbon Cocoa CoreServices ScreenSaver UserNotifications; 35407 35408 }; 35408 35409 35409 35410 synergyWithoutGUI = synergy.override { withGUI = false; };