2020-04-24 23:36:52 +00:00
|
|
|
{ mkDerivation
|
|
|
|
, lib
|
|
|
|
, fetchFromGitHub
|
2022-11-21 17:40:18 +00:00
|
|
|
, substituteAll
|
2020-04-24 23:36:52 +00:00
|
|
|
, qtbase
|
|
|
|
, qtwebengine
|
|
|
|
, qtdeclarative
|
|
|
|
, extra-cmake-modules
|
|
|
|
, cpp-utilities
|
|
|
|
, qtutilities
|
2022-06-16 17:23:12 +00:00
|
|
|
, qtforkawesome
|
|
|
|
, boost
|
2020-04-24 23:36:52 +00:00
|
|
|
, cmake
|
|
|
|
, kio
|
|
|
|
, plasma-framework
|
|
|
|
, qttools
|
|
|
|
, webviewSupport ? true
|
|
|
|
, jsSupport ? true
|
|
|
|
, kioPluginSupport ? true
|
|
|
|
, plasmoidSupport ? true
|
|
|
|
, systemdSupport ? true
|
2023-03-04 12:14:45 +00:00
|
|
|
/* It is possible to set via this option an absolute exec path that will be
|
|
|
|
written to the `~/.config/autostart/syncthingtray.desktop` file generated
|
|
|
|
during runtime. Alternatively, one can edit the desktop file themselves after
|
|
|
|
it is generated See:
|
|
|
|
https://github.com/NixOS/nixpkgs/issues/199596#issuecomment-1310136382 */
|
|
|
|
, autostartExecPath ? "syncthingtray"
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
mkDerivation rec {
|
2023-03-04 12:14:45 +00:00
|
|
|
version = "1.3.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "syncthingtray";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Martchus";
|
|
|
|
repo = "syncthingtray";
|
|
|
|
rev = "v${version}";
|
2023-03-04 12:14:45 +00:00
|
|
|
sha256 = "sha256-zLZw6ltdgO66dvKdLXhr/a6r8UhbSAx06jXrgMARHyw=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
buildInputs = [
|
|
|
|
qtbase
|
|
|
|
cpp-utilities
|
|
|
|
qtutilities
|
|
|
|
boost
|
|
|
|
qtforkawesome
|
|
|
|
]
|
2020-04-24 23:36:52 +00:00
|
|
|
++ lib.optionals webviewSupport [ qtwebengine ]
|
|
|
|
++ lib.optionals jsSupport [ qtdeclarative ]
|
|
|
|
++ lib.optionals kioPluginSupport [ kio ]
|
2021-03-15 08:37:03 +00:00
|
|
|
++ lib.optionals plasmoidSupport [ plasma-framework ]
|
2020-04-24 23:36:52 +00:00
|
|
|
;
|
|
|
|
|
2021-03-15 08:37:03 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
qttools
|
|
|
|
]
|
|
|
|
++ lib.optionals plasmoidSupport [ extra-cmake-modules ]
|
|
|
|
;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-05-29 06:06:01 +00:00
|
|
|
# No tests are available by upstream, but we test --help anyway
|
|
|
|
doInstallCheck = true;
|
|
|
|
installCheckPhase = ''
|
|
|
|
$out/bin/syncthingtray --help | grep ${version}
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
cmakeFlags = [
|
2023-03-04 12:14:45 +00:00
|
|
|
"-DAUTOSTART_EXEC_PATH=${autostartExecPath}"
|
2020-04-24 23:36:52 +00:00
|
|
|
# See https://github.com/Martchus/syncthingtray/issues/42
|
|
|
|
"-DQT_PLUGIN_DIR:STRING=${placeholder "out"}/lib/qt-5"
|
|
|
|
] ++ lib.optionals (!plasmoidSupport) ["-DNO_PLASMOID=ON"]
|
|
|
|
++ lib.optionals (!kioPluginSupport) ["-DNO_FILE_ITEM_ACTION_PLUGIN=ON"]
|
|
|
|
++ lib.optionals systemdSupport ["-DSYSTEMD_SUPPORT=ON"]
|
|
|
|
++ lib.optionals (!webviewSupport) ["-DWEBVIEW_PROVIDER:STRING=none"]
|
|
|
|
;
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/Martchus/syncthingtray";
|
|
|
|
description = "Tray application and Dolphin/Plasma integration for Syncthing";
|
2021-03-15 08:37:03 +00:00
|
|
|
license = licenses.gpl2Plus;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ doronbehar ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|