2019-08-23 17:18:56 +01:00
|
|
|
{ mkDerivation
|
|
|
|
, lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, qtbase
|
|
|
|
, qtwebengine
|
|
|
|
, qtdeclarative
|
|
|
|
, extra-cmake-modules
|
|
|
|
, cpp-utilities
|
|
|
|
, qtutilities
|
|
|
|
, cmake
|
|
|
|
, kio
|
|
|
|
, plasma-framework
|
|
|
|
, qttools
|
|
|
|
, webviewSupport ? true
|
|
|
|
, jsSupport ? true
|
|
|
|
, kioPluginSupport ? true
|
|
|
|
, plasmoidSupport ? true
|
|
|
|
, systemdSupport ? true
|
|
|
|
}:
|
|
|
|
|
|
|
|
mkDerivation rec {
|
2021-03-13 14:57:41 +00:00
|
|
|
version = "1.1.3";
|
2019-08-23 17:18:56 +01:00
|
|
|
pname = "syncthingtray";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Martchus";
|
|
|
|
repo = "syncthingtray";
|
|
|
|
rev = "v${version}";
|
2021-03-13 14:57:41 +00:00
|
|
|
sha256 = "sha256-ovit2XSkxSjcbpqQUv8IzMqfsfItbtXLbx0/Vy0+J0Y=";
|
2019-08-23 17:18:56 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ qtbase cpp-utilities qtutilities ]
|
|
|
|
++ lib.optionals webviewSupport [ qtwebengine ]
|
|
|
|
++ lib.optionals jsSupport [ qtdeclarative ]
|
|
|
|
++ lib.optionals kioPluginSupport [ kio ]
|
2021-03-13 14:57:41 +00:00
|
|
|
++ lib.optionals plasmoidSupport [ plasma-framework ]
|
2019-08-23 17:18:56 +01:00
|
|
|
;
|
|
|
|
|
2021-03-13 14:57:41 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
qttools
|
|
|
|
]
|
|
|
|
++ lib.optionals plasmoidSupport [ extra-cmake-modules ]
|
|
|
|
;
|
2019-08-23 17:18:56 +01:00
|
|
|
|
2020-05-13 11:54:17 +01:00
|
|
|
# No tests are available by upstream, but we test --help anyway
|
|
|
|
doInstallCheck = true;
|
|
|
|
installCheckPhase = ''
|
|
|
|
$out/bin/syncthingtray --help | grep ${version}
|
|
|
|
'';
|
|
|
|
|
2019-08-23 17:18:56 +01:00
|
|
|
cmakeFlags = [
|
|
|
|
# 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"]
|
2019-11-02 12:21:42 +00:00
|
|
|
++ lib.optionals (!webviewSupport) ["-DWEBVIEW_PROVIDER:STRING=none"]
|
2019-08-23 17:18:56 +01:00
|
|
|
;
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/Martchus/syncthingtray";
|
|
|
|
description = "Tray application and Dolphin/Plasma integration for Syncthing";
|
2021-03-13 14:57:41 +00:00
|
|
|
license = licenses.gpl2Plus;
|
2019-08-23 17:18:56 +01:00
|
|
|
maintainers = with maintainers; [ doronbehar ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|