summary refs log tree commit diff
diff options
context:
space:
mode:
authorolegkapitonov <35794650+olegkapitonov@users.noreply.github.com>2022-01-27 06:29:32 +0300
committerGitHub <noreply@github.com>2022-01-27 11:29:32 +0800
commitae5361fa1b3aefe862b843133901667444389f3e (patch)
tree7db998f5ea9e2a606b9ffd2561950d06bc0ea8cf
parentcdc93e847d34da9929078d24da3645dc64ca8e92 (diff)
downloadnixpkgs-ae5361fa1b3aefe862b843133901667444389f3e.tar
nixpkgs-ae5361fa1b3aefe862b843133901667444389f3e.tar.gz
nixpkgs-ae5361fa1b3aefe862b843133901667444389f3e.tar.bz2
nixpkgs-ae5361fa1b3aefe862b843133901667444389f3e.tar.lz
nixpkgs-ae5361fa1b3aefe862b843133901667444389f3e.tar.xz
nixpkgs-ae5361fa1b3aefe862b843133901667444389f3e.tar.zst
nixpkgs-ae5361fa1b3aefe862b843133901667444389f3e.zip
fix MTP support on KDE Plasma and Dolphin (#155405)
* fix MTP support on KDE Plasma and Dolphin

* Update pkgs/applications/kde/kio-extras.nix

Co-authored-by: ElXreno <elxreno@gmail.com>

Co-authored-by: Peter Hoeg <peter@hoeg.com>
Co-authored-by: ElXreno <elxreno@gmail.com>
-rw-r--r--nixos/modules/services/x11/desktop-managers/plasma5.nix3
-rw-r--r--pkgs/applications/kde/kio-extras.nix7
2 files changed, 9 insertions, 1 deletions
diff --git a/nixos/modules/services/x11/desktop-managers/plasma5.nix b/nixos/modules/services/x11/desktop-managers/plasma5.nix
index 9bacdaa9be9..b7aa2eba81c 100644
--- a/nixos/modules/services/x11/desktop-managers/plasma5.nix
+++ b/nixos/modules/services/x11/desktop-managers/plasma5.nix
@@ -394,7 +394,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 4a41493a525..29a3bdc97bb 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" ];
 }