Patching kdePackages.dolphin

I’m on nixos-unstable and I guess I need to work on how I search GitHub issues to notice I just need to wait a bit. But this bug is bothering me enough to use the overlay you offered, so since I’m on nixos-unstable I didn’t include the version and src overrides.

nixpkgs.overlays = [
  (final: prev: {
    kdePackages = prev.kdePackages.overrideScope (
      kfinal: kprev: {
        dolphin = kprev.dolphin.overrideAttrs (oldAttrs: {
          patches = (oldAttrs.patches or [ ]) ++ [
            # Fix customizing the default view settings not working
            # https://bugs.kde.org/show_bug.cgi?id=495878
            (pkgs.fetchpatch2 {
              url = "https://invent.kde.org/system/dolphin/-/commit/86609f89358243c08ebe4de8498a0fa6dff8370e.patch";
              hash = "sha256-rxHpGDx2m5bpVsjhpK5XsUpg/SAJ8njBYh41V5E25oA=";
            })
          ];
        });
      }
    );
  })
];

I’d normally override at time-of-use (and didn’t consider I could just do a override regardless of how it’s called in nixpkgs) but since dolphin is being implicitly pulled by services.desktopManager.plasma6 it’s more snowflake than I care to have on my system. I’m sure this will explode later once nixos-unstable gets updated, but I’m treating it as a reminder to remove this overlay for the sake of making sure I don’t accidentally hold back packages longer than they should.

But hey dolphin is respecting my view settings correctly and that’s all I really care for right now.

For an exercise I did search on just merging the PR from nixpkgs and landed here, but assumes you’re using a flake-based system which I’m not using. And looking further, handling a local copy of nixpkgs to manage yourself is just not something I want to deal with. So I really should consider looking at flakes. Sometime. Eventually.

1 Like