diff options
author | Kim Lindberger <kim.lindberger@gmail.com> | 2020-02-17 20:41:43 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-17 14:41:43 -0500 |
commit | a2f3ec7a60dfa8cd7e34c78617ac11cabb3c0b22 (patch) | |
tree | 8e7d5e555268802399e6e14de789ed35dec73461 /pkgs/applications/misc/synergy | |
parent | 69efb5cd343a947502bf2372c0385e0afc84c570 (diff) |
synergy: Build application bundle on Darwin + other fixes (#80354)
Includes the following fixes for Darwin: - Build an application bundle - Don't install the .desktop file and icons - Get rid of unused cmake variables - Don't list avahi as a dependency, since it's not used
Diffstat (limited to 'pkgs/applications/misc/synergy')
-rw-r--r-- | pkgs/applications/misc/synergy/default.nix | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/pkgs/applications/misc/synergy/default.nix b/pkgs/applications/misc/synergy/default.nix index 69c2e37e35207..645ed7433b32f 100644 --- a/pkgs/applications/misc/synergy/default.nix +++ b/pkgs/applications/misc/synergy/default.nix @@ -1,6 +1,6 @@ -{ stdenv, lib, fetchFromGitHub, cmake, avahi-compat +{ stdenv, lib, fetchFromGitHub, cmake, openssl , ApplicationServices, Carbon, Cocoa, CoreServices, ScreenSaver -, xlibsWrapper, libX11, libXi, libXtst, libXrandr, xinput, openssl +, xlibsWrapper, libX11, libXi, libXtst, libXrandr, xinput, avahi-compat , withGUI ? true, wrapQtAppsHook }: stdenv.mkDerivation rec { @@ -35,20 +35,19 @@ stdenv.mkDerivation rec { chmod -R +w ext/ ''; - cmakeFlags = lib.optionals stdenv.isDarwin [ - "-DOSX_TARGET_MAJOR=10" - "-DOSX_TARGET_MINOR=7" - ] ++ lib.optional (!withGUI) "-DSYNERGY_BUILD_LEGACY_GUI=OFF"; + cmakeFlags = lib.optional (!withGUI) "-DSYNERGY_BUILD_LEGACY_GUI=OFF"; nativeBuildInputs = [ cmake ] ++ lib.optional withGUI wrapQtAppsHook; dontWrapQtApps = true; buildInputs = [ - openssl avahi-compat + openssl ] ++ lib.optionals stdenv.isDarwin [ ApplicationServices Carbon Cocoa CoreServices ScreenSaver - ] ++ lib.optionals stdenv.isLinux [ xlibsWrapper libX11 libXi libXtst libXrandr xinput ]; + ] ++ lib.optionals stdenv.isLinux [ + xlibsWrapper libX11 libXi libXtst libXrandr xinput avahi-compat + ]; installPhase = '' mkdir -p $out/bin @@ -56,10 +55,15 @@ stdenv.mkDerivation rec { '' + lib.optionalString withGUI '' cp bin/synergy $out/bin/ wrapQtApp $out/bin/synergy --prefix PATH : ${lib.makeBinPath [ openssl ]} + '' + lib.optionalString stdenv.isLinux '' mkdir -p $out/share/icons/hicolor/scalable/apps cp ../res/synergy.svg $out/share/icons/hicolor/scalable/apps/ mkdir -p $out/share/applications substitute ../res/synergy.desktop $out/share/applications/synergy.desktop --replace /usr/bin $out/bin + '' + lib.optionalString stdenv.isDarwin '' + mkdir -p $out/Applications/ + mv bundle/Synergy.app $out/Applications/ + ln -s $out/bin $out/Applications/Synergy.app/Contents/MacOS ''; doCheck = true; |