lol
1{
2 stdenv, mkDerivation, lib,
3 extra-cmake-modules, kdoctools,
4 breeze-icons, chmlib ? null, discount, djvulibre, ebook_tools, kactivities,
5 karchive, kbookmarks, kcompletion, kconfig, kconfigwidgets, kcoreaddons,
6 kdbusaddons, kdegraphics-mobipocket, kiconthemes, kjs, khtml, kio, kparts,
7 kpty, kpurpose, kwallet, kwindowsystem, libkexiv2, libspectre, libzip, phonon, poppler,
8 qca-qt5, qtdeclarative, qtsvg, threadweaver, kcrash
9}:
10
11mkDerivation {
12 pname = "okular";
13 nativeBuildInputs = [ extra-cmake-modules kdoctools ];
14 buildInputs = [
15 breeze-icons discount djvulibre ebook_tools kactivities karchive kbookmarks
16 kcompletion kconfig kconfigwidgets kcoreaddons kdbusaddons
17 kdegraphics-mobipocket kiconthemes kjs khtml kio kparts kpty kpurpose kwallet
18 kwindowsystem libkexiv2 libspectre libzip phonon poppler qca-qt5
19 qtdeclarative qtsvg threadweaver kcrash
20 ] ++ lib.optional (!stdenv.isAarch64) chmlib;
21
22 # InitialPreference values are too high and end up making okular
23 # default for anything considered text/plain. Resetting to 1, which
24 # is the default.
25 postPatch = ''
26 substituteInPlace generators/txt/okularApplication_txt.desktop \
27 --replace InitialPreference=3 InitialPreference=1
28 '';
29
30 meta = with lib; {
31 homepage = "http://www.kde.org";
32 description = "KDE document viewer";
33 license = with licenses; [ gpl2 lgpl21 fdl12 bsd3 ];
34 maintainers = with maintainers; [ ttuegel turion ];
35 platforms = lib.platforms.linux;
36 };
37}