Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: f5ddad7d5eec
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: bde944148037
Choose a head ref
  • 2 commits
  • 3 files changed
  • 2 contributors

Commits on Apr 28, 2020

  1. kde/{kate,konqueror,okular}: decrease text mimetype preference

    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
    matthewbauer committed Apr 28, 2020

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    jonringer Jonathan Ringer
    Copy the full SHA
    b3f8126 View commit details
  2. Merge pull request #86147 from matthewbauer/tweak-kde-preferences

    kde/{kate,konqueror,okular}: decrease text mimetype preference
    worldofpeace authored Apr 28, 2020
    Copy the full SHA
    bde9441 View commit details
Showing with 28 additions and 1 deletion.
  1. +10 −0 pkgs/applications/kde/kate.nix
  2. +9 −1 pkgs/applications/kde/konqueror.nix
  3. +9 −0 pkgs/applications/kde/okular.nix
10 changes: 10 additions & 0 deletions pkgs/applications/kde/kate.nix
Original file line number Diff line number Diff line change
@@ -14,6 +14,16 @@ mkDerivation {
maintainers = [ lib.maintainers.ttuegel ];
};

# InitialPreference values are too high and end up making kate &
# kwrite defaults for anything considered text/plain. Resetting to
# 1, which is the default.
postPatch = ''
substituteInPlace kate/data/org.kde.kate.desktop \
--replace InitialPreference=9 InitialPreference=1
substituteInPlace kwrite/data/org.kde.kwrite.desktop \
--replace InitialPreference=8 InitialPreference=1
'';

nativeBuildInputs = [ extra-cmake-modules kdoctools ];
buildInputs = [
libgit2
10 changes: 9 additions & 1 deletion pkgs/applications/kde/konqueror.nix
Original file line number Diff line number Diff line change
@@ -12,9 +12,17 @@ mkDerivation {
kdelibs4support kcmutils khtml kdesu
qtwebkit qtwebengine qtx11extras qtscript qtwayland
];

# InitialPreference values are too high and any text/html ends up
# opening konqueror, even if firefox or chromium are also available.
# Resetting to 1, which is the default.
postPatch = ''
substituteInPlace kfmclient_html.desktop \
--replace InitialPreference=9 InitialPreference=1
'';

meta = {
license = with lib.licenses; [ gpl2 ];
maintainers = with lib.maintainers; [ ];
};
}

9 changes: 9 additions & 0 deletions pkgs/applications/kde/okular.nix
Original file line number Diff line number Diff line change
@@ -18,6 +18,15 @@ mkDerivation {
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 ];