syncthingtray: Add Darwin support

This commit is contained in:
waelwindows 2023-04-15 02:19:22 +03:00
parent e0eec9aed4
commit 9da70d133f

View file

@ -1,5 +1,6 @@
{ mkDerivation { mkDerivation
, lib , lib
, stdenv
, fetchFromGitHub , fetchFromGitHub
, substituteAll , substituteAll
, qtbase , qtbase
@ -14,11 +15,12 @@
, kio , kio
, plasma-framework , plasma-framework
, qttools , qttools
, iconv
, webviewSupport ? true , webviewSupport ? true
, jsSupport ? true , jsSupport ? true
, kioPluginSupport ? true , kioPluginSupport ? stdenv.isLinux
, plasmoidSupport ? true , plasmoidSupport ? stdenv.isLinux
, systemdSupport ? true , systemdSupport ? stdenv.isLinux
/* It is possible to set via this option an absolute exec path that will be /* It is possible to set via this option an absolute exec path that will be
written to the `~/.config/autostart/syncthingtray.desktop` file generated written to the `~/.config/autostart/syncthingtray.desktop` file generated
during runtime. Alternatively, one can edit the desktop file themselves after during runtime. Alternatively, one can edit the desktop file themselves after
@ -44,7 +46,7 @@ mkDerivation rec {
qtutilities qtutilities
boost boost
qtforkawesome qtforkawesome
] ] ++ lib.optionals stdenv.isDarwin [ iconv ]
++ lib.optionals webviewSupport [ qtwebengine ] ++ lib.optionals webviewSupport [ qtwebengine ]
++ lib.optionals jsSupport [ qtdeclarative ] ++ lib.optionals jsSupport [ qtdeclarative ]
++ lib.optionals kioPluginSupport [ kio ] ++ lib.optionals kioPluginSupport [ kio ]
@ -59,7 +61,8 @@ mkDerivation rec {
; ;
# No tests are available by upstream, but we test --help anyway # No tests are available by upstream, but we test --help anyway
doInstallCheck = true; # Don't test on Darwin because output is .app
doInstallCheck = !stdenv.isDarwin;
installCheckPhase = '' installCheckPhase = ''
$out/bin/syncthingtray --help | grep ${version} $out/bin/syncthingtray --help | grep ${version}
''; '';
@ -79,6 +82,6 @@ mkDerivation rec {
description = "Tray application and Dolphin/Plasma integration for Syncthing"; description = "Tray application and Dolphin/Plasma integration for Syncthing";
license = licenses.gpl2Plus; license = licenses.gpl2Plus;
maintainers = with maintainers; [ doronbehar ]; maintainers = with maintainers; [ doronbehar ];
platforms = platforms.linux; platforms = platforms.linux ++ platforms.darwin;
}; };
} }