Merge pull request #283514 from mroi/patch-synergy
synergy: fix x86_64-darwin build
This commit is contained in:
commit
50b52d37ad
@ -1,15 +0,0 @@
|
||||
diff --git a/src/gui/src/OSXHelpers.mm b/src/gui/src/OSXHelpers.mm
|
||||
index 0c98afc1..38c190a6 100644
|
||||
--- a/src/gui/src/OSXHelpers.mm
|
||||
+++ b/src/gui/src/OSXHelpers.mm
|
||||
@@ -20,10 +20,6 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <CoreData/CoreData.h>
|
||||
#import <Cocoa/Cocoa.h>
|
||||
-#import <UserNotifications/UNNotification.h>
|
||||
-#import <UserNotifications/UNUserNotificationCenter.h>
|
||||
-#import <UserNotifications/UNNotificationContent.h>
|
||||
-#import <UserNotifications/UNNotificationTrigger.h>
|
||||
|
||||
#import <QtGlobal>
|
||||
|
@ -27,12 +27,12 @@
|
||||
, avahi-compat
|
||||
|
||||
# MacOS / darwin
|
||||
, darwin
|
||||
, ApplicationServices
|
||||
, Carbon
|
||||
, Cocoa
|
||||
, CoreServices
|
||||
, ScreenSaver
|
||||
, UserNotifications
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
@ -50,10 +50,6 @@ stdenv.mkDerivation rec {
|
||||
patches = [
|
||||
# Without this OpenSSL from nixpkgs is not detected
|
||||
./darwin-non-static-openssl.patch
|
||||
] ++ lib.optionals (stdenv.isDarwin && !(darwin.apple_sdk.frameworks ? UserNotifications)) [
|
||||
# We cannot include UserNotifications because of a build failure in the Apple SDK.
|
||||
# The functions used from it are already implicitly included anyways.
|
||||
./darwin-no-UserNotifications-includes.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
@ -79,8 +75,7 @@ stdenv.mkDerivation rec {
|
||||
Cocoa
|
||||
CoreServices
|
||||
ScreenSaver
|
||||
] ++ lib.optionals (stdenv.isDarwin && darwin.apple_sdk.frameworks ? UserNotifications) [
|
||||
darwin.apple_sdk.frameworks.UserNotifications
|
||||
UserNotifications
|
||||
] ++ lib.optionals stdenv.isLinux [
|
||||
util-linux
|
||||
libselinux
|
||||
@ -110,6 +105,10 @@ stdenv.mkDerivation rec {
|
||||
|
||||
checkPhase = ''
|
||||
runHook preCheck
|
||||
'' + lib.optionalString stdenv.isDarwin ''
|
||||
# filter out tests failing with sandboxing on darwin
|
||||
export GTEST_FILTER=-ServerConfigTests.serverconfig_will_deem_equal_configs_with_same_cell_names:NetworkAddress.hostname_valid_parsing
|
||||
'' + ''
|
||||
bin/unittests
|
||||
runHook postCheck
|
||||
'';
|
||||
@ -126,7 +125,7 @@ stdenv.mkDerivation rec {
|
||||
cp ../res/synergy.svg $out/share/icons/hicolor/scalable/apps/
|
||||
substitute ../res/synergy.desktop $out/share/applications/synergy.desktop \
|
||||
--replace "/usr/bin" "$out/bin"
|
||||
'' + lib.optionalString stdenv.isDarwin ''
|
||||
'' + lib.optionalString (stdenv.isDarwin && withGUI) ''
|
||||
mkdir -p $out/Applications
|
||||
cp -r bundle/Synergy.app $out/Applications
|
||||
ln -s $out/bin $out/Applications/Synergy.app/Contents/MacOS
|
||||
|
@ -35403,7 +35403,8 @@ with pkgs;
|
||||
};
|
||||
|
||||
synergy = libsForQt5.callPackage ../applications/misc/synergy {
|
||||
inherit (darwin.apple_sdk.frameworks) ApplicationServices Carbon Cocoa CoreServices ScreenSaver;
|
||||
stdenv = if stdenv.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv;
|
||||
inherit (darwin.apple_sdk_11_0.frameworks) ApplicationServices Carbon Cocoa CoreServices ScreenSaver UserNotifications;
|
||||
};
|
||||
|
||||
synergyWithoutGUI = synergy.override { withGUI = false; };
|
||||
|
Loading…
Reference in New Issue
Block a user