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 , avahi-compat 28 29 # MacOS / darwin 30 - , darwin 31 , ApplicationServices 32 , Carbon 33 , Cocoa 34 , CoreServices 35 , ScreenSaver 36 }: 37 38 stdenv.mkDerivation rec { ··· 50 patches = [ 51 # Without this OpenSSL from nixpkgs is not detected 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 ]; 58 59 postPatch = '' ··· 79 Cocoa 80 CoreServices 81 ScreenSaver 82 - ] ++ lib.optionals (stdenv.isDarwin && darwin.apple_sdk.frameworks ? UserNotifications) [ 83 - darwin.apple_sdk.frameworks.UserNotifications 84 ] ++ lib.optionals stdenv.isLinux [ 85 util-linux 86 libselinux ··· 110 111 checkPhase = '' 112 runHook preCheck 113 bin/unittests 114 runHook postCheck 115 ''; ··· 126 cp ../res/synergy.svg $out/share/icons/hicolor/scalable/apps/ 127 substitute ../res/synergy.desktop $out/share/applications/synergy.desktop \ 128 --replace "/usr/bin" "$out/bin" 129 - '' + lib.optionalString stdenv.isDarwin '' 130 mkdir -p $out/Applications 131 cp -r bundle/Synergy.app $out/Applications 132 ln -s $out/bin $out/Applications/Synergy.app/Contents/MacOS
··· 27 , avahi-compat 28 29 # MacOS / darwin 30 , ApplicationServices 31 , Carbon 32 , Cocoa 33 , CoreServices 34 , ScreenSaver 35 + , UserNotifications 36 }: 37 38 stdenv.mkDerivation rec { ··· 50 patches = [ 51 # Without this OpenSSL from nixpkgs is not detected 52 ./darwin-non-static-openssl.patch 53 ]; 54 55 postPatch = '' ··· 75 Cocoa 76 CoreServices 77 ScreenSaver 78 + UserNotifications 79 ] ++ lib.optionals stdenv.isLinux [ 80 util-linux 81 libselinux ··· 105 106 checkPhase = '' 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 + '' + '' 112 bin/unittests 113 runHook postCheck 114 ''; ··· 125 cp ../res/synergy.svg $out/share/icons/hicolor/scalable/apps/ 126 substitute ../res/synergy.desktop $out/share/applications/synergy.desktop \ 127 --replace "/usr/bin" "$out/bin" 128 + '' + lib.optionalString (stdenv.isDarwin && withGUI) '' 129 mkdir -p $out/Applications 130 cp -r bundle/Synergy.app $out/Applications 131 ln -s $out/bin $out/Applications/Synergy.app/Contents/MacOS
+2 -1
pkgs/top-level/all-packages.nix
··· 35403 }; 35404 35405 synergy = libsForQt5.callPackage ../applications/misc/synergy { 35406 - inherit (darwin.apple_sdk.frameworks) ApplicationServices Carbon Cocoa CoreServices ScreenSaver; 35407 }; 35408 35409 synergyWithoutGUI = synergy.override { withGUI = false; };
··· 35403 }; 35404 35405 synergy = libsForQt5.callPackage ../applications/misc/synergy { 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; 35408 }; 35409 35410 synergyWithoutGUI = synergy.override { withGUI = false; };