Subject: [PATCH v2] gnu: kio-extras: Fix kiod path.

From: Sughosha <[email-masked]>
Date: Sun, 4 May 2025 20:11:59 +0530

* gnu/packages/kde.scm (kio-extras)[arguments]Realign.
<#:phases>: Add fix-kiod-path phase.

Change-Id: Ifda410609323dc55797a9e97191909824679dd8f
---
 gnu/packages/kde.scm | 28 +++++++++++++++++++++-------
 1 file changed, 21 insertions(+), 7 deletions(-)

diff --git a/gnu/packages/kde.scm b/gnu/packages/kde.scm
index cf9b0a5298f..c0b94c6bcfe 100644
--- a/gnu/packages/kde.scm
+++ b/gnu/packages/kde.scm
@@ -753,13 +753,27 @@ (define-public kio-extras
                 "0h720wcgsdx9h5vlr4flxrd3djmhwvlwkrf0yzwsf4amcb9wds8r"))))
     (build-system cmake-build-system)
     (arguments
-     (list #:phases #~(modify-phases %standard-phases
-                        (replace 'check
-                          (lambda* (#:key tests? #:allow-other-keys)
-                            (when tests?
-                              (setenv "HOME" (getcwd))
-                              (setenv "TMPDIR" (getcwd))
-                              (invoke "ctest" "-E" "(thumbnailtest|testkioarchive)")))))))
+     (list #:phases
+           #~(modify-phases %standard-phases
+               (replace 'check
+                 (lambda* (#:key tests? #:allow-other-keys)
+                   (when tests?
+                   (setenv "HOME" (getcwd))
+                   (setenv "TMPDIR" (getcwd))
+                   (invoke "ctest" "-E"
+                           "(thumbnailtest|testkioarchive)"))))
+               (add-after 'install 'fix-kiod-path
+                 (lambda _
+                   (let* ((kio #$(this-package-input "kio"))
+                          (kf-version
+                           #$(version-major
+                              (package-version (this-package-input "kio")))))
+                     (substitute* (string-append #$output
+                                                 "/share/dbus-1/services/"
+                                                 "org.kde.kmtpd5.service")
+                       (("Exec=.*$")
+                        (string-append "Exec=" kio "/libexec/kf" kf-version
+                                       "/kiod" kf-version "\n")))))))))
     (native-inputs (list extra-cmake-modules dbus kdoctools pkg-config qttools))
     ;; TODO: libappimage
     (inputs (list gperf

base-commit: cea6eedfcea2defa526bc58d4fb2085cc8c0cb36
-- 
2.48.1