From 741fdb7e29e0cd4db9546beaffb84a683fc04bc6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 28 Jan 2022 12:13:30 +0800 Subject: [PATCH] [Backport release-21.11] fix MTP support on KDE Plasma and Dolphin (#156981) * fix MTP support on KDE Plasma and Dolphin (cherry picked from commit c1e4f4d661296c36886d81952862a6efb1fdccd4) * Update pkgs/applications/kde/kio-extras.nix Co-authored-by: ElXreno (cherry picked from commit a2415efca6b4405c7af24ff71009d28565b080f8) Co-authored-by: Oleg Kapitonov Co-authored-by: Peter Hoeg --- nixos/modules/services/x11/desktop-managers/plasma5.nix | 3 ++- pkgs/applications/kde/kio-extras.nix | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/nixos/modules/services/x11/desktop-managers/plasma5.nix b/nixos/modules/services/x11/desktop-managers/plasma5.nix index 8a1793484e23..ca8da99d1c8e 100644 --- a/nixos/modules/services/x11/desktop-managers/plasma5.nix +++ b/nixos/modules/services/x11/desktop-managers/plasma5.nix @@ -372,7 +372,8 @@ in # Extra UDEV rules used by Solid services.udev.packages = [ - pkgs.libmtp + # libmtp has "bin", "dev", "out" outputs. UDEV rules file is in "out". + pkgs.libmtp.out pkgs.media-player-info ]; diff --git a/pkgs/applications/kde/kio-extras.nix b/pkgs/applications/kde/kio-extras.nix index 4a41493a525c..29a3bdc97bb8 100644 --- a/pkgs/applications/kde/kio-extras.nix +++ b/pkgs/applications/kde/kio-extras.nix @@ -19,5 +19,12 @@ mkDerivation { kpty syntax-highlighting libmtp libssh openexr openslp phonon qtsvg samba solid gperf ]; + + # org.kde.kmtpd5 DBUS service launches kiod5 binary from kio derivation, not from kio-extras + postInstall = '' + substituteInPlace $out/share/dbus-1/services/org.kde.kmtpd5.service \ + --replace Exec=$out Exec=${kio} + ''; + CXXFLAGS = [ "-I${ilmbase.dev}/include/OpenEXR" ]; }