anchor.diff:  , avahi-compat
   
     # MacOS / darwin
  +, darwin
   , ApplicationServices
   , Carbon
   , Cocoa
  
positive.code:   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}";
  
    doCheck = true;
  
  
negative.code:   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
  