diff --git a/pkgs/applications/misc/actiona/default.nix b/pkgs/applications/misc/actiona/default.nix deleted file mode 100644 index 069473ce3c0f..000000000000 --- a/pkgs/applications/misc/actiona/default.nix +++ /dev/null @@ -1,112 +0,0 @@ -{ - lib, - stdenv, - fetchFromGitHub, - cmake, - pkg-config, - wrapQtAppsHook, - - bluez, - libnotify, - libXdmcp, - libXtst, - opencv, - qtbase, - qtmultimedia, - qtscript, - qttools, - qtx11extras, - qtxmlpatterns, - - # Running with TTS support causes the program to freeze for a few seconds every time at startup, - # so it is disabled by default - textToSpeechSupport ? false, - qtspeech, -}: - -let - # For some reason qtscript wants to use the same version of qtbase as itself - # This override makes it think that they are the same version - qtscript' = qtscript.overrideAttrs (oldAttrs: { - inherit (qtbase) version; - postPatch = '' - substituteInPlace .qmake.conf \ - --replace-fail ${oldAttrs.version} ${qtbase.version} - ''; - }); -in -stdenv.mkDerivation (finalAttrs: { - pname = "actiona"; - version = "3.10.2"; - - src = fetchFromGitHub { - owner = "Jmgr"; - repo = "actiona"; - rev = "v${finalAttrs.version}"; - hash = "sha256-4RKCNEniBBx0kDwdHVZOqXYeGCsH8g6SfVc8JdDV0hI="; - fetchSubmodules = true; - }; - - patches = - [ - # Sets the proper search location for the `.so` files and the translations - ./fix-paths.patch - ] - ++ lib.optionals (!textToSpeechSupport) [ - # Removes TTS support - ./disable-tts.patch - ]; - - postPatch = '' - substituteInPlace gui/src/mainwindow.cpp executer/src/executer.cpp tools/src/languages.cpp \ - --subst-var out - ''; - - nativeBuildInputs = [ - cmake - pkg-config - wrapQtAppsHook - ]; - - buildInputs = [ - bluez - libnotify - libXdmcp - libXtst - opencv - qtbase - qtmultimedia - qtscript' - qttools - qtx11extras - qtxmlpatterns - ] ++ lib.optionals textToSpeechSupport [ qtspeech ]; - - # RPATH of binary /nix/store/.../bin/... contains a forbidden reference to /build/ - cmakeFlags = [ (lib.cmakeBool "CMAKE_SKIP_BUILD_RPATH" true) ]; - - # udev is used by the system-actionpack - env.NIX_LDFLAGS = "-ludev"; - - installPhase = '' - runHook preInstall - - install -Dm755 {execution,actiontools,tools}/*.so -t $out/lib - install -Dm755 actions/actionpack*.so -t $out/lib/actions - install -Dm755 actiona actexec -t $out/bin - install -Dm644 translations/*.qm -t $out/share/actiona/translations - install -Dm644 $src/actiona.desktop -t $out/share/applications - install -Dm644 $src/gui/icons/actiona.png -t $out/share/icons/hicolor/48x48/apps - - runHook postInstall - ''; - - meta = { - description = "Cross-platform automation tool"; - homepage = "https://github.com/Jmgr/actiona"; - license = lib.licenses.gpl3Only; - mainProgram = "actiona"; - maintainers = with lib.maintainers; [ tomasajt ]; - platforms = lib.platforms.linux; - }; -}) diff --git a/pkgs/applications/misc/actiona/disable-tts.patch b/pkgs/applications/misc/actiona/disable-tts.patch deleted file mode 100644 index 977959db254c..000000000000 --- a/pkgs/applications/misc/actiona/disable-tts.patch +++ /dev/null @@ -1,54 +0,0 @@ -diff --git a/actions/system/CMakeLists.txt b/actions/system/CMakeLists.txt -index ca861145..3e3d3d3b 100644 ---- a/actions/system/CMakeLists.txt -+++ b/actions/system/CMakeLists.txt -@@ -66,8 +66,6 @@ set(HEADERS - ${HEADERS_PREFIX}/actions/playsoundinstance.hpp - ${HEADERS_PREFIX}/actions/systemdefinition.hpp - ${HEADERS_PREFIX}/actions/systeminstance.hpp -- ${HEADERS_PREFIX}/actions/texttospeechdefinition.hpp -- ${HEADERS_PREFIX}/actions/texttospeechinstance.hpp - ${HEADERS_PREFIX}/code/mediaplaylist.hpp - ${HEADERS_PREFIX}/code/notify.hpp - ${HEADERS_PREFIX}/code/process.hpp -@@ -131,7 +129,6 @@ find_package(Qt5 ${ACT_MINIMUM_QT_VERSION} COMPONENTS - DBus - Multimedia - MultimediaWidgets -- TextToSpeech - REQUIRED) - - target_include_directories(${PROJECT} -@@ -153,7 +150,6 @@ target_link_libraries(${PROJECT} - Qt5::DBus - Qt5::Multimedia - Qt5::MultimediaWidgets -- Qt5::TextToSpeech - ${LIBNOTIFY_LIBRARIES} - ${BLUEZ_LIBRARIES} - ${UDEV_LIBRARIES} -diff --git a/actions/system/src/actionpacksystem.hpp b/actions/system/src/actionpacksystem.hpp -index c5768415..27a899d6 100644 ---- a/actions/system/src/actionpacksystem.hpp -+++ b/actions/system/src/actionpacksystem.hpp -@@ -31,10 +31,6 @@ - #include "actions/playsounddefinition.hpp" - #include "actions/findimagedefinition.hpp" - --#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0) --#include "actions/texttospeechdefinition.hpp" --#endif -- - #include "code/system.hpp" - #include "code/mediaplaylist.hpp" - #include "code/notify.hpp" -@@ -67,9 +63,6 @@ public: - addActionDefinition(new Actions::DetachedCommandDefinition(this)); - addActionDefinition(new Actions::PlaySoundDefinition(this)); - addActionDefinition(new Actions::FindImageDefinition(this)); --#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0) -- addActionDefinition(new Actions::TextToSpeechDefinition(this)); --#endif - } - - QString id() const override { return QStringLiteral("system"); } diff --git a/pkgs/applications/misc/actiona/fix-paths.patch b/pkgs/applications/misc/actiona/fix-paths.patch deleted file mode 100644 index 1c26159bbfdb..000000000000 --- a/pkgs/applications/misc/actiona/fix-paths.patch +++ /dev/null @@ -1,39 +0,0 @@ -diff --git a/executer/src/executer.cpp b/executer/src/executer.cpp -index da848dad..5bd7e986 100644 ---- a/executer/src/executer.cpp -+++ b/executer/src/executer.cpp -@@ -45,7 +45,7 @@ bool Executer::start(QIODevice *device, const QString &filename) - QSettings settings; - QString locale = settings.value(QStringLiteral("gui/locale"), QLocale::system().name()).toString(); - -- mActionFactory->loadActionPacks(QApplication::applicationDirPath() + QStringLiteral("/actions"), locale); -+ mActionFactory->loadActionPacks(QStringLiteral("@out@/lib/actions"), locale); - #ifndef Q_OS_WIN - if(mActionFactory->actionPackCount() == 0) - mActionFactory->loadActionPacks(QStringLiteral("actiona/actions/"), locale); -diff --git a/gui/src/mainwindow.cpp b/gui/src/mainwindow.cpp -index 6052648e..3c802d93 100644 ---- a/gui/src/mainwindow.cpp -+++ b/gui/src/mainwindow.cpp -@@ -322,7 +322,7 @@ void MainWindow::postInit() - if(mSplashScreen) - mSplashScreen->showMessage(tr("Loading actions...")); - -- mActionFactory->loadActionPacks(QApplication::applicationDirPath() + QStringLiteral("/actions"), mUsedLocale); -+ mActionFactory->loadActionPacks(QStringLiteral("@out@/lib/actions"), mUsedLocale); - #ifndef Q_OS_WIN - if(mActionFactory->actionPackCount() == 0) - mActionFactory->loadActionPacks(QStringLiteral("actiona/actions/"), mUsedLocale); -diff --git a/tools/src/languages.cpp b/tools/src/languages.cpp -index 4926936e..18e9aabb 100644 ---- a/tools/src/languages.cpp -+++ b/tools/src/languages.cpp -@@ -79,7 +79,7 @@ namespace Tools - void Languages::installTranslator(const QString &componentName, const QString &locale) - { - auto translator = new QTranslator(QCoreApplication::instance()); -- if(!translator->load(QStringLiteral("%1/translations/%2_%3").arg(QCoreApplication::applicationDirPath()).arg(componentName).arg(locale))) -+ if(!translator->load(QStringLiteral("@out@/share/actiona/translations/%1_%2").arg(componentName).arg(locale))) - { - auto path = QStringLiteral("%1/translations/%2_%3").arg(QDir::currentPath()).arg(componentName).arg(locale); - if(!translator->load(path)) diff --git a/pkgs/by-name/ac/actiona/disable-tts.patch b/pkgs/by-name/ac/actiona/disable-tts.patch new file mode 100644 index 000000000000..ec36dff532a5 --- /dev/null +++ b/pkgs/by-name/ac/actiona/disable-tts.patch @@ -0,0 +1,96 @@ +diff --git a/actexec/CMakeLists.txt b/actexec/CMakeLists.txt +index 49d8128..e8bfa16 100644 +--- a/actexec/CMakeLists.txt ++++ b/actexec/CMakeLists.txt +@@ -40,7 +40,7 @@ endif() + + setup_target(${PROJECT}) + +-find_package(Qt6 ${ACT_MINIMUM_QT_VERSION} COMPONENTS Qml Network Widgets Core5Compat Multimedia TextToSpeech REQUIRED) ++find_package(Qt6 ${ACT_MINIMUM_QT_VERSION} COMPONENTS Qml Network Widgets Core5Compat Multimedia REQUIRED) + + target_link_directories(${PROJECT} + PRIVATE +@@ -75,7 +75,6 @@ target_link_libraries( + Qt6::Widgets + Qt6::Core5Compat + Qt6::Multimedia +- Qt6::TextToSpeech + ${LIBNOTIFY_LIBRARIES} + ) + +diff --git a/actiona/CMakeLists.txt b/actiona/CMakeLists.txt +index d03d650..222b2f9 100644 +--- a/actiona/CMakeLists.txt ++++ b/actiona/CMakeLists.txt +@@ -125,7 +125,7 @@ endif() + + setup_target(${PROJECT}) + +-find_package(Qt6 ${ACT_MINIMUM_QT_VERSION} COMPONENTS Qml Network Widgets Core5Compat Multimedia TextToSpeech REQUIRED) ++find_package(Qt6 ${ACT_MINIMUM_QT_VERSION} COMPONENTS Qml Network Widgets Core5Compat Multimedia REQUIRED) + + target_link_directories(${PROJECT} + PRIVATE +@@ -162,7 +162,6 @@ target_link_libraries( + Qt6::Widgets + Qt6::Core5Compat + Qt6::Multimedia +- Qt6::TextToSpeech + ${LIBNOTIFY_LIBRARIES} + ${LIBX11_LIBRARIES} + $<$:shlwapi> +diff --git a/actions/system/CMakeLists.txt b/actions/system/CMakeLists.txt +index a3019b1..6d9430c 100644 +--- a/actions/system/CMakeLists.txt ++++ b/actions/system/CMakeLists.txt +@@ -67,8 +67,6 @@ set(HEADERS + ${HEADERS_PREFIX}/actions/playsoundinstance.hpp + ${HEADERS_PREFIX}/actions/systemdefinition.hpp + ${HEADERS_PREFIX}/actions/systeminstance.hpp +- ${HEADERS_PREFIX}/actions/texttospeechdefinition.hpp +- ${HEADERS_PREFIX}/actions/texttospeechinstance.hpp + ${HEADERS_PREFIX}/code/mediaplaylist.hpp + ${HEADERS_PREFIX}/code/notify.hpp + ${HEADERS_PREFIX}/code/process.hpp +@@ -140,7 +138,6 @@ find_package(Qt6 ${ACT_MINIMUM_QT_VERSION} COMPONENTS + DBus + Multimedia + MultimediaWidgets +- TextToSpeech + REQUIRED) + + target_link_directories(${PROJECT} +@@ -167,7 +164,6 @@ target_link_libraries(${PROJECT} + Qt6::DBus + Qt6::Multimedia + Qt6::MultimediaWidgets +- Qt6::TextToSpeech + ${LIBNOTIFY_LIBRARIES} + ${BLUEZ_LIBRARIES} + $<$:Bthprops> +diff --git a/actions/system/src/actionpacksystem.hpp b/actions/system/src/actionpacksystem.hpp +index ea045e3..a5af35a 100644 +--- a/actions/system/src/actionpacksystem.hpp ++++ b/actions/system/src/actionpacksystem.hpp +@@ -32,10 +32,6 @@ + #include "actions/playsounddefinition.hpp" + #include "actions/findimagedefinition.hpp" + +-#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0) +-#include "actions/texttospeechdefinition.hpp" +-#endif +- + #include "code/system.hpp" + #include "code/mediaplaylist.hpp" + #include "code/notify.hpp" +@@ -64,9 +60,6 @@ public: + addActionDefinition(new Actions::DetachedCommandDefinition(this)); + addActionDefinition(new Actions::PlaySoundDefinition(this)); + addActionDefinition(new Actions::FindImageDefinition(this)); +-#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0) +- addActionDefinition(new Actions::TextToSpeechDefinition(this)); +-#endif + } + + QString id() const override { return QStringLiteral("system"); } diff --git a/pkgs/by-name/ac/actiona/package.nix b/pkgs/by-name/ac/actiona/package.nix new file mode 100644 index 000000000000..6f858cab5a4c --- /dev/null +++ b/pkgs/by-name/ac/actiona/package.nix @@ -0,0 +1,62 @@ +{ + lib, + stdenv, + fetchFromGitHub, + + cmake, + pkg-config, + + bluez, + libnotify, + opencv, + qt6, + + # Running with TTS support causes the program to freeze for a few seconds every time at startup, + # so it is disabled by default + textToSpeechSupport ? false, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "actiona"; + version = "3.11.1"; + + src = fetchFromGitHub { + owner = "Jmgr"; + repo = "actiona"; + rev = "v${finalAttrs.version}"; + hash = "sha256-sJlzrrpmo2CbzChCtiyxqDtjoN58BN4Ptjm4sH83zAw="; + fetchSubmodules = true; + }; + + patches = lib.optionals (!textToSpeechSupport) [ + # Removes TTS support + ./disable-tts.patch + ]; + + strictDeps = true; + + nativeBuildInputs = [ + cmake + pkg-config + qt6.wrapQtAppsHook + ]; + + buildInputs = [ + bluez + libnotify + opencv + qt6.qtbase + qt6.qtmultimedia + qt6.qttools + qt6.qt5compat + ] ++ lib.optionals textToSpeechSupport [ qt6.qtspeech ]; + + meta = { + description = "Cross-platform automation tool"; + homepage = "https://github.com/Jmgr/actiona"; + license = lib.licenses.gpl3Only; + mainProgram = "actiona"; + maintainers = with lib.maintainers; [ tomasajt ]; + platforms = lib.platforms.linux; + }; +}) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d775e24bc64a..fda1cb5390e9 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6819,8 +6819,6 @@ with pkgs; ### DEVELOPMENT / TOOLS - actiona = libsForQt5.callPackage ../applications/misc/actiona { }; - inherit (callPackage ../development/tools/alloy { }) alloy5 alloy6