about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSandro <sandro.jaeckel@gmail.com>2022-12-29 01:13:32 +0100
committerGitHub <noreply@github.com>2022-12-29 01:13:32 +0100
commitdef5159fd95f18c2ff7d2cac3f509c68369b6eeb (patch)
tree97ba45da80244e7728f8a57884b819aa29934707
parent7d91ec68f883e8a576267deb830a63e88fade1d3 (diff)
parente772ade40ac721e48a1897672b517e3babeb7c17 (diff)
Merge pull request #207723 from SuperSandro2000/okular-speech
-rw-r--r--pkgs/applications/kde/okular.nix24
1 files changed, 14 insertions, 10 deletions
diff --git a/pkgs/applications/kde/okular.nix b/pkgs/applications/kde/okular.nix
index f2f5630422247..e2d468b4ff7b2 100644
--- a/pkgs/applications/kde/okular.nix
+++ b/pkgs/applications/kde/okular.nix
@@ -1,23 +1,25 @@
-{
-  stdenv, mkDerivation, lib,
-  extra-cmake-modules, kdoctools,
-  breeze-icons, chmlib, discount, djvulibre, ebook_tools, kactivities,
-  karchive, kbookmarks, kcompletion, kconfig, kconfigwidgets, kcoreaddons,
-  kdbusaddons, kdegraphics-mobipocket, kiconthemes, kjs, khtml, kio, kparts,
-  kpty, kpurpose, kwallet, kwindowsystem, libkexiv2, libspectre, libzip, phonon, poppler,
-  qca-qt5, qtdeclarative, qtsvg, threadweaver, kcrash, qtspeech
+{ stdenv, mkDerivation, lib
+, extra-cmake-modules, kdoctools
+, breeze-icons, chmlib, discount, djvulibre, ebook_tools, kactivities
+, karchive, kbookmarks, kcompletion, kconfig, kconfigwidgets, kcoreaddons
+, kdbusaddons, kdegraphics-mobipocket, kiconthemes, kjs, khtml, kio, kparts
+, kpty, kpurpose, kwallet, kwindowsystem, libkexiv2, libspectre, libzip, phonon, poppler
+, qca-qt5, qtdeclarative, qtsvg, threadweaver, kcrash
+, withSpeech ? true, qtspeech
 }:
 
 mkDerivation {
   pname = "okular";
+
   nativeBuildInputs = [ extra-cmake-modules kdoctools ];
+
   buildInputs = [
     breeze-icons discount djvulibre ebook_tools kactivities karchive kbookmarks
     kcompletion kconfig kconfigwidgets kcoreaddons kdbusaddons
     kdegraphics-mobipocket kiconthemes kjs khtml kio kparts kpty kpurpose kwallet
     kwindowsystem libkexiv2 libspectre libzip phonon poppler qca-qt5
-    qtdeclarative qtsvg threadweaver kcrash qtspeech chmlib
-  ];
+    qtdeclarative qtsvg threadweaver kcrash chmlib
+  ] ++ lib.optional withSpeech qtspeech;
 
   # InitialPreference values are too high and end up making okular
   # default for anything considered text/plain. Resetting to 1, which
@@ -27,6 +29,8 @@ mkDerivation {
       --replace InitialPreference=3 InitialPreference=1
   '';
 
+  cmakeFlags = lib.optional (!withSpeech) "-DFORCE_NOT_REQUIRED_DEPENDENCIES=Qt5TextToSpeech";
+
   meta = with lib; {
     homepage = "http://www.kde.org";
     description = "KDE document viewer";