From bebfb35f677685d6ffe7c95b38b46741821c4fee Mon Sep 17 00:00:00 2001 From: Guy Chronister Date: Sun, 24 Aug 2025 09:23:19 -0500 Subject: [PATCH] syncthingtray: migrate to by-name --- .../sy/syncthingtray/package.nix} | 45 +++++++------------ pkgs/top-level/all-packages.nix | 5 --- 2 files changed, 17 insertions(+), 33 deletions(-) rename pkgs/{applications/misc/syncthingtray/default.nix => by-name/sy/syncthingtray/package.nix} (76%) diff --git a/pkgs/applications/misc/syncthingtray/default.nix b/pkgs/by-name/sy/syncthingtray/package.nix similarity index 76% rename from pkgs/applications/misc/syncthingtray/default.nix rename to pkgs/by-name/sy/syncthingtray/package.nix index 9d902d07b895..cfaa3d5723c3 100644 --- a/pkgs/applications/misc/syncthingtray/default.nix +++ b/pkgs/by-name/sy/syncthingtray/package.nix @@ -2,21 +2,10 @@ lib, stdenv, fetchFromGitHub, - qtbase, - qtsvg, - qtwayland, - qtwebengine, - qtdeclarative, - extra-cmake-modules, + kdePackages, cpp-utilities, - qtutilities, - qtforkawesome, boost, - wrapQtAppsHook, cmake, - kio, - plasma-framework, - qttools, iconv, cppunit, syncthing, @@ -49,37 +38,37 @@ stdenv.mkDerivation (finalAttrs: { }; buildInputs = [ - qtbase - qtsvg + kdePackages.qtbase + kdePackages.qtsvg cpp-utilities - qtutilities + kdePackages.qtutilities boost - qtforkawesome + kdePackages.qtforkawesome ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ iconv ] - ++ lib.optionals stdenv.hostPlatform.isLinux [ qtwayland ] - ++ lib.optionals webviewSupport [ qtwebengine ] - ++ lib.optionals jsSupport [ qtdeclarative ] - ++ lib.optionals kioPluginSupport [ kio ] - ++ lib.optionals plasmoidSupport [ plasma-framework ]; + ++ lib.optionals stdenv.hostPlatform.isLinux [ kdePackages.qtwayland ] + ++ lib.optionals webviewSupport [ kdePackages.qtwebengine ] + ++ lib.optionals jsSupport [ kdePackages.qtdeclarative ] + ++ lib.optionals kioPluginSupport [ kdePackages.kio ] + ++ lib.optionals plasmoidSupport [ kdePackages.libplasma ]; nativeBuildInputs = [ - wrapQtAppsHook + kdePackages.wrapQtAppsHook cmake - qttools + kdePackages.qttools # Although these are test dependencies, we add them anyway so that we test # whether the test units compile. On Darwin we don't run the tests but we # still build them. cppunit syncthing ] - ++ lib.optionals plasmoidSupport [ extra-cmake-modules ]; + ++ lib.optionals plasmoidSupport [ kdePackages.extra-cmake-modules ]; # syncthing server seems to hang on darwin, causing tests to fail. doCheck = !stdenv.hostPlatform.isDarwin; preCheck = '' export QT_QPA_PLATFORM=offscreen - export QT_PLUGIN_PATH="${lib.getBin qtbase}/${qtbase.qtPluginPrefix}" + export QT_PLUGIN_PATH="${lib.getBin kdePackages.qtbase}/${kdePackages.qtbase.qtPluginPrefix}" ''; postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' # put the app bundle into the proper place /Applications instead of /bin @@ -94,14 +83,14 @@ stdenv.mkDerivation (finalAttrs: { doInstallCheck = true; cmakeFlags = [ - "-DQT_PACKAGE_PREFIX=Qt${lib.versions.major qtbase.version}" - "-DKF_PACKAGE_PREFIX=KF${lib.versions.major qtbase.version}" + "-DQT_PACKAGE_PREFIX=Qt${lib.versions.major kdePackages.qtbase.version}" + "-DKF_PACKAGE_PREFIX=KF${lib.versions.major kdePackages.qtbase.version}" "-DBUILD_TESTING=ON" # See https://github.com/Martchus/syncthingtray/issues/208 "-DEXCLUDE_TESTS_FROM_ALL=OFF" "-DAUTOSTART_EXEC_PATH=${autostartExecPath}" # See https://github.com/Martchus/syncthingtray/issues/42 - "-DQT_PLUGIN_DIR:STRING=${placeholder "out"}/${qtbase.qtPluginPrefix}" + "-DQT_PLUGIN_DIR:STRING=${placeholder "out"}/${kdePackages.qtbase.qtPluginPrefix}" "-DBUILD_SHARED_LIBS=ON" ] ++ lib.optionals (!plasmoidSupport) [ "-DNO_PLASMOID=ON" ] diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 0d3d4cf78014..335ab5c8452e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10984,11 +10984,6 @@ with pkgs; syncthing-relay ; - syncthingtray = kdePackages.callPackage ../applications/misc/syncthingtray { - # renamed in KF5 -> KF6 - plasma-framework = kdePackages.libplasma; - }; - synergyWithoutGUI = synergy.override { withGUI = false; }; tabbed = callPackage ../applications/window-managers/tabbed {