mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-29 09:04:17 +00:00
b3f812688c
These .desktop files set InitialPreference>1 which will override other associations even the .desktop appears first in XDG_DATA_DIRS. This applies to: - org.kde.kate.desktop - org.kde.kwrite.desktop - kfmclient_html.desktop - okularApplication_txt.desktop Fixes #86137
37 lines
1.4 KiB
Nix
37 lines
1.4 KiB
Nix
{
|
|
stdenv, mkDerivation, lib,
|
|
extra-cmake-modules, kdoctools,
|
|
breeze-icons, chmlib ? null, discount, djvulibre, ebook_tools, kactivities,
|
|
karchive, kbookmarks, kcompletion, kconfig, kconfigwidgets, kcoreaddons,
|
|
kdbusaddons, kdegraphics-mobipocket, kiconthemes, kjs, khtml, kio, kparts,
|
|
kpty, kwallet, kwindowsystem, libkexiv2, libspectre, libzip, phonon, poppler,
|
|
qca-qt5, qtdeclarative, qtsvg, threadweaver, kcrash
|
|
}:
|
|
|
|
mkDerivation {
|
|
name = "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 kwallet
|
|
kwindowsystem libkexiv2 libspectre libzip phonon poppler qca-qt5
|
|
qtdeclarative qtsvg threadweaver kcrash
|
|
] ++ lib.optional (!stdenv.isAarch64) chmlib;
|
|
|
|
# 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
|
|
'';
|
|
|
|
meta = with lib; {
|
|
homepage = "http://www.kde.org";
|
|
license = with licenses; [ gpl2 lgpl21 fdl12 bsd3 ];
|
|
maintainers = with maintainers; [ ttuegel turion ];
|
|
platforms = lib.platforms.linux;
|
|
};
|
|
}
|