about summary refs log tree commit diff
path: root/pkgs/applications/misc
diff options
context:
space:
mode:
authorMichael Hoang <enzime@users.noreply.github.com>2022-11-01 11:41:15 +1100
committerMichael Hoang <enzime@users.noreply.github.com>2022-11-01 21:43:04 +1100
commit57b57170f49cba2123bfca38e50c0cdeebf01790 (patch)
treee67198195a6c821f7a9236f7eb5428ee89a22398 /pkgs/applications/misc
parentf7ecc5425cf4047066a4e9315ee15979156ad845 (diff)
synergy: fix build on aarch64-darwin
Diffstat (limited to 'pkgs/applications/misc')
-rw-r--r--pkgs/applications/misc/synergy/default.nix7
1 files changed, 6 insertions, 1 deletions
diff --git a/pkgs/applications/misc/synergy/default.nix b/pkgs/applications/misc/synergy/default.nix
index f756e9788ac95..d401b2c421954 100644
--- a/pkgs/applications/misc/synergy/default.nix
+++ b/pkgs/applications/misc/synergy/default.nix
@@ -26,6 +26,7 @@
 , avahi-compat
 
   # MacOS / darwin
+, darwin
 , ApplicationServices
 , Carbon
 , Cocoa
@@ -48,6 +49,7 @@ 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
@@ -76,6 +78,8 @@ stdenv.mkDerivation rec {
     Cocoa
     CoreServices
     ScreenSaver
+  ] ++ lib.optionals (stdenv.isDarwin && darwin.apple_sdk.frameworks ? UserNotifications) [
+    darwin.apple_sdk.frameworks.UserNotifications
   ] ++ lib.optionals stdenv.isLinux [
     util-linux
     libselinux
@@ -97,7 +101,8 @@ stdenv.mkDerivation rec {
   NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-Wno-inconsistent-missing-override";
 
   cmakeFlags = lib.optional (!withGUI) "-DSYNERGY_BUILD_LEGACY_GUI=OFF"
-    ++ lib.optional stdenv.isDarwin "-DCMAKE_OSX_DEPLOYMENT_TARGET=${stdenv.targetPlatform.darwinSdkVersion}";
+    # NSFilenamesPboardType is deprecated in 10.14+
+    ++ lib.optional stdenv.isDarwin "-DCMAKE_OSX_DEPLOYMENT_TARGET=${if stdenv.isAarch64 then "10.13" else stdenv.targetPlatform.darwinSdkVersion}";
 
   doCheck = true;