synergy: 1.14.1.32 -> 1.14.5.17

+82 -58
+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 +
+14
pkgs/applications/misc/synergy/darwin-non-static-openssl.patch
··· 1 + diff --git a/CMakeLists.txt b/CMakeLists.txt 2 + index 63764a75..46db60f4 100644 3 + --- a/CMakeLists.txt 4 + +++ b/CMakeLists.txt 5 + @@ -339,9 +339,6 @@ endif() 6 + # Apple has to use static libraries because 7 + # "Use of the Apple-provided OpenSSL libraries by apps is strongly discouraged." 8 + # https://developer.apple.com/library/archive/documentation/Security/Conceptual/cryptoservices/SecureNetworkCommunicationAPIs/SecureNetworkCommunicationAPIs.html 9 + -if(APPLE OR DEFINED ENV{SYNERGY_STATIC_OPENSSL}) 10 + - set(OPENSSL_USE_STATIC_LIBS TRUE) 11 + -endif() 12 + find_package(OpenSSL REQUIRED) 13 + 14 + #
+53 -29
pkgs/applications/misc/synergy/default.nix
··· 1 1 { withGUI ? true 2 2 , stdenv 3 3 , lib 4 - , fetchpatch 5 4 , fetchFromGitHub 6 5 , wrapQtAppsHook 7 6 ··· 17 16 , qttools 18 17 , xlibsWrapper 19 18 , libX11 19 + , libxkbfile 20 20 , libXi 21 21 , libXtst 22 22 , libXrandr 23 + , libXinerama 24 + , xkeyboardconfig 23 25 , xinput 24 26 , avahi-compat 25 27 26 - # macOS / darwin 28 + # MacOS / darwin 27 29 , ApplicationServices 28 30 , Carbon 29 31 , Cocoa ··· 33 35 34 36 stdenv.mkDerivation rec { 35 37 pname = "synergy"; 36 - version = "1.14.1.32"; 38 + version = "1.14.5.17"; 37 39 38 40 src = fetchFromGitHub { 39 41 owner = "symless"; 40 42 repo = "synergy-core"; 41 - rev = "${version}-stable"; 43 + rev = version; 44 + sha256 = "sha256-9B6KPa1TsS4khCf7ccmwQZJ1KDEuLNw/W0PScYCgtlE="; 42 45 fetchSubmodules = true; 43 - sha256 = "123p75rm22vb3prw1igh0yii2y4bvv7r18iykfvmnr41hh4w7z2p"; 44 46 }; 45 47 46 - patches = [ ./macos_build_fix.patch ]; 48 + patches = [ 49 + # Without this OpenSSL from nixpkgs is not detected 50 + ./darwin-non-static-openssl.patch 51 + # We cannot include UserNotifications because of a build failure in the Apple SDK. 52 + # The functions used from it are already implicitly included anyways. 53 + ./darwin-no-UserNotifications-includes.patch 54 + ]; 47 55 48 56 postPatch = '' 49 57 substituteInPlace src/gui/src/SslCertificate.cpp \ 50 58 --replace 'kUnixOpenSslCommand[] = "openssl";' 'kUnixOpenSslCommand[] = "${openssl}/bin/openssl";' 59 + '' + lib.optionalString stdenv.isLinux '' 60 + substituteInPlace src/lib/synergy/unix/AppUtilUnix.cpp \ 61 + --replace "/usr/share/X11/xkb/rules/evdev.xml" "${xkeyboardconfig}/share/X11/xkb/rules/evdev.xml" 51 62 ''; 52 63 53 - cmakeFlags = lib.optionals (!withGUI) [ 54 - "-DSYNERGY_BUILD_LEGACY_GUI=OFF" 55 - ] ++ lib.optionals stdenv.isDarwin [ 56 - "-DCMAKE_OSX_DEPLOYMENT_TARGET=10.09" 57 - ]; 58 - NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-Wno-inconsistent-missing-override"; 59 - 60 - nativeBuildInputs = [ cmake pkg-config wrapQtAppsHook ]; 61 - 62 - dontWrapQtApps = true; 64 + nativeBuildInputs = [ 65 + cmake 66 + pkg-config 67 + ] ++ lib.optional withGUI wrapQtAppsHook; 63 68 64 69 buildInputs = [ 70 + qttools # Used for translations even when not building the GUI 65 71 openssl 66 72 pcre 67 - ] ++ lib.optionals withGUI [ 68 - qttools 69 73 ] ++ lib.optionals stdenv.isDarwin [ 70 74 ApplicationServices 71 75 Carbon ··· 81 85 libXi 82 86 libXtst 83 87 libXrandr 88 + libXinerama 89 + libxkbfile 84 90 xinput 85 91 avahi-compat 86 92 gdk-pixbuf 87 93 libnotify 88 94 ]; 89 95 96 + # Silences many warnings 97 + NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-Wno-inconsistent-missing-override"; 98 + 99 + cmakeFlags = lib.optional (!withGUI) "-DSYNERGY_BUILD_LEGACY_GUI=OFF" 100 + ++ lib.optional stdenv.isDarwin "-DCMAKE_OSX_DEPLOYMENT_TARGET=${stdenv.targetPlatform.darwinSdkVersion}"; 101 + 102 + doCheck = true; 103 + 104 + checkPhase = '' 105 + runHook preCheck 106 + bin/unittests 107 + runHook postCheck 108 + ''; 109 + 90 110 installPhase = '' 111 + runHook preInstall 112 + 91 113 mkdir -p $out/bin 92 114 cp bin/{synergyc,synergys,synergyd,syntool} $out/bin/ 93 115 '' + lib.optionalString withGUI '' 94 116 cp bin/synergy $out/bin/ 95 - wrapQtApp $out/bin/synergy 96 117 '' + lib.optionalString stdenv.isLinux '' 97 - mkdir -p $out/share/icons/hicolor/scalable/apps 118 + mkdir -p $out/share/{applications,icons/hicolor/scalable/apps} 98 119 cp ../res/synergy.svg $out/share/icons/hicolor/scalable/apps/ 99 - mkdir -p $out/share/applications 100 - substitute ../res/synergy.desktop $out/share/applications/synergy.desktop --replace /usr/bin $out/bin 120 + substitute ../res/synergy.desktop $out/share/applications/synergy.desktop \ 121 + --replace "/usr/bin" "$out/bin" 101 122 '' + lib.optionalString stdenv.isDarwin '' 102 - mkdir -p $out/Applications/ 103 - mv bundle/Synergy.app $out/Applications/ 123 + mkdir -p $out/Applications 124 + cp -r bundle/Synergy.app $out/Applications 104 125 ln -s $out/bin $out/Applications/Synergy.app/Contents/MacOS 126 + '' + '' 127 + runHook postInstall 105 128 ''; 106 129 107 - doCheck = true; 108 - checkPhase = "bin/unittests"; 130 + dontWrapQtApps = lib.optional (!withGUI) true; 109 131 110 132 meta = with lib; { 111 133 description = "Share one mouse and keyboard between multiple computers"; 112 134 homepage = "https://symless.com/synergy"; 113 - license = licenses.gpl2; 114 - maintainers = with maintainers; [ talyz ]; 115 - platforms = platforms.all; 135 + changelog = "https://github.com/symless/synergy-core/blob/${version}/ChangeLog"; 136 + mainProgram = lib.optionalString (!withGUI) "synergyc"; 137 + license = licenses.gpl2Only; 138 + maintainers = with maintainers; [ talyz ivar ]; 139 + platforms = platforms.unix; 116 140 }; 117 141 }
-29
pkgs/applications/misc/synergy/macos_build_fix.patch
··· 1 - diff --git a/CMakeLists.txt b/CMakeLists.txt 2 - index 50e712fa..d39c2ce4 100644 3 - --- a/CMakeLists.txt 4 - +++ b/CMakeLists.txt 5 - @@ -326,9 +326,6 @@ endif() 6 - # Apple has to use static libraries because 7 - # "Use of the Apple-provided OpenSSL libraries by apps is strongly discouraged." 8 - # https://developer.apple.com/library/archive/documentation/Security/Conceptual/cryptoservices/SecureNetworkCommunicationAPIs/SecureNetworkCommunicationAPIs.html 9 - -if(APPLE) 10 - - set(OPENSSL_USE_STATIC_LIBS TRUE) 11 - -endif() 12 - find_package(OpenSSL REQUIRED) 13 - 14 - # 15 - diff --git a/src/gui/src/OSXHelpers.mm b/src/gui/src/OSXHelpers.mm 16 - index 0c98afc1..38c190a6 100644 17 - --- a/src/gui/src/OSXHelpers.mm 18 - +++ b/src/gui/src/OSXHelpers.mm 19 - @@ -20,10 +20,6 @@ 20 - #import <Foundation/Foundation.h> 21 - #import <CoreData/CoreData.h> 22 - #import <Cocoa/Cocoa.h> 23 - -#import <UserNotifications/UNNotification.h> 24 - -#import <UserNotifications/UNUserNotificationCenter.h> 25 - -#import <UserNotifications/UNNotificationContent.h> 26 - -#import <UserNotifications/UNNotificationTrigger.h> 27 - 28 - #import <QtGlobal> 29 -