nixpkgs/pkgs/applications/kde/okular.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

42 lines
1.6 KiB
Nix
Raw Normal View History

{ 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
2023-03-17 22:39:35 +00:00
, withSpeech ? true, qtspeech, qtx11extras
}:
2017-05-16 15:56:41 +00:00
mkDerivation {
2020-12-24 23:05:07 +00:00
pname = "okular";
2017-05-17 19:26:11 +00:00
nativeBuildInputs = [ extra-cmake-modules kdoctools ];
buildInputs = [
breeze-icons discount djvulibre ebook_tools kactivities karchive kbookmarks
kcompletion kconfig kconfigwidgets kcoreaddons kdbusaddons
2020-10-28 08:13:05 +00:00
kdegraphics-mobipocket kiconthemes kjs khtml kio kparts kpty kpurpose kwallet
kwindowsystem libkexiv2 libspectre libzip phonon poppler qca-qt5
2023-03-17 22:39:35 +00:00
qtdeclarative qtsvg threadweaver kcrash chmlib qtx11extras
] ++ lib.optional withSpeech qtspeech;
# InitialPreference values are too high and end up making okular
# default for anything considered text/plain. Resetting to 1, which
# is the default.
postPatch = ''
substituteInPlace generators/txt/okularApplication_txt.desktop \
--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";
2022-10-27 20:47:29 +00:00
license = with licenses; [ gpl2Plus lgpl21Plus fdl12Plus bsd3 ];
maintainers = with maintainers; [ ttuegel ];
platforms = lib.platforms.linux;
};
}