syncthingtray: use cmake helpers

We have helpers available for cmake options that make things much easier
to read and more ergonomic to use. So let's use them.
This commit is contained in:
Peter H. Hoeg
2026-02-14 10:53:59 +01:00
parent 144391594f
commit 77d568e85e
+12 -12
View File
@@ -83,20 +83,20 @@ stdenv.mkDerivation (finalAttrs: {
doInstallCheck = true;
cmakeFlags = [
"-DQT_PACKAGE_PREFIX=Qt${lib.versions.major kdePackages.qtbase.version}"
"-DKF_PACKAGE_PREFIX=KF${lib.versions.major kdePackages.qtbase.version}"
"-DBUILD_TESTING=ON"
(lib.cmakeFeature "QT_PACKAGE_PREFIX" "Qt${lib.versions.major kdePackages.qtbase.version}")
(lib.cmakeFeature "KF_PACKAGE_PREFIX" "KF${lib.versions.major kdePackages.qtbase.version}")
(lib.cmakeBool "BUILD_TESTING" (finalAttrs.doCheck or false))
# See https://github.com/Martchus/syncthingtray/issues/208
"-DEXCLUDE_TESTS_FROM_ALL=OFF"
"-DAUTOSTART_EXEC_PATH=${autostartExecPath}"
(lib.cmakeBool "EXCLUDE_TESTS_FROM_ALL" false)
(lib.cmakeFeature "AUTOSTART_EXEC_PATH" autostartExecPath)
# See https://github.com/Martchus/syncthingtray/issues/42
"-DQT_PLUGIN_DIR:STRING=${placeholder "out"}/${kdePackages.qtbase.qtPluginPrefix}"
"-DBUILD_SHARED_LIBS=ON"
]
++ 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" ];
(lib.cmakeFeature "QT_PLUGIN_DIR" "${placeholder "out"}/${kdePackages.qtbase.qtPluginPrefix}")
(lib.cmakeBool "BUILD_SHARED_LIBS" true)
(lib.cmakeBool "NO_PLASMOID" (!plasmoidSupport))
(lib.cmakeBool "NO_FILE_ITEM_ACTION_PLUGIN" (!kioPluginSupport))
(lib.cmakeBool "SYSTEMD_SUPPORT" systemdSupport)
(lib.cmakeFeature "WEBVIEW_PROVIDER" (if webviewSupport then "webengine" else "none"))
];
qtWrapperArgs = [
"--prefix PATH : ${lib.makeBinPath [ xdg-utils ]}"