Subject: [bug#78307] [PATCH] gnu: xdg-utils: Update to 1.2.1.

From: Zheng Junjie <[email-masked]>
Date: Thu, 8 May 2025 11:43:19 +0800

* gnu/packages/freedesktop.scm (xdg-utils): Update to 1.2.1.
[source]: update url. Switch to git-fetch.
[native-inputs]: Add docbook-xml-4.3.

Change-Id: If843ed148e85b9c44d0b28e327ff551d5457103e
---
 gnu/packages/freedesktop.scm | 61 +++++++++++++++++++-----------------
 1 file changed, 32 insertions(+), 29 deletions(-)

diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index de8fb975bcc..8796928c83c 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -34,7 +34,7 @@
 ;;; Copyright © 2022 muradm <[email-masked]>
 ;;; Copyright © 2023 Alex Devaure <[email-masked]>
 ;;; Copyright © 2023 Bruno Victal <[email-masked]>
-;;; Copyright © 2024 Zheng Junjie <[email-masked]>
+;;; Copyright © 2024, 2025 Zheng Junjie <[email-masked]>
 ;;; Copyright © 2022 Samuel Culpepper <[email-masked]>
 ;;; Copyright © 2024 aurtzy <[email-masked]>
 ;;; Copyright © 2024 Dariqq <[email-masked]>
@@ -668,19 +668,22 @@ (define-public shared-mime-info
 (define-public xdg-utils
   (package
     (name "xdg-utils")
-    (version "1.1.3")
+    (version "1.2.1")
     (source
      (origin
-       (method url-fetch)
-       (uri (string-append
-             "https://portland.freedesktop.org/download/xdg-utils-"
-             version ".tar.gz"))
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://gitlab.freedesktop.org/xdg/xdg-utils.git")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
        (sha256
         (base32
-         "1nai806smz3zcb2l5iny4x7li0fak0rzmjg6vlyhdqm8z25b166p"))))
+         "0hnb523hiz8wy6gffapys6vw7h1xq50li0s31mvyv4v5nmp2bhg7"))))
     (build-system gnu-build-system)
     (native-inputs
-     (list docbook-xsl docbook-xml-4.1.2
+     (list docbook-xsl
+           docbook-xml-4.1.2
+           docbook-xml-4.3
            libxslt xmlto w3m-for-tests))
     (inputs
      (list bash-minimal                 ;for 'wrap-program'
@@ -700,27 +703,27 @@ (define-public xdg-utils
                   ,@%default-gnu-modules)
       #:phases
       #~(modify-phases %standard-phases
-        (add-after 'unpack 'patch-hardcoded-paths
-          (lambda* (#:key inputs #:allow-other-keys)
-            (substitute* "scripts/xdg-mime.in"
-              (("/usr/bin/file")
-               (search-input-file inputs "bin/file")))
-            (substitute* "scripts/xdg-open.in"
-              (("/usr/bin/printf")
-               (search-input-file inputs "bin/printf")))))
-        (add-after 'install 'wrap-executables
-          (lambda* (#:key inputs outputs #:allow-other-keys)
-            (let* ((dependencies '("awk" "grep" "hostname" "ls" "mimeopen"
-                                   "sed" "xprop" "xset"))
-                   (pkgs (map (lambda (cmd)
-                                (search-input-file inputs
-                                                   (string-append "bin/" cmd)))
-                              dependencies))
-                   (bindirs (map dirname pkgs)))
-              (with-directory-excursion (string-append #$output "/bin")
-                (for-each (cute wrap-program <>
-                                `("PATH" ":" prefix ,bindirs))
-                          (find-files ".")))))))))
+          (add-after 'unpack 'patch-hardcoded-paths
+            (lambda* (#:key inputs #:allow-other-keys)
+              (substitute* "scripts/xdg-mime.in"
+                (("/usr/bin/file")
+                 (search-input-file inputs "bin/file")))
+              (substitute* "scripts/xdg-open.in"
+                (("/usr/bin/printf")
+                 (search-input-file inputs "bin/printf")))))
+          (add-after 'install 'wrap-executables
+            (lambda* (#:key inputs outputs #:allow-other-keys)
+              (let* ((dependencies '("awk" "grep" "hostname" "ls" "mimeopen"
+                                     "sed" "xprop" "xset"))
+                     (pkgs (map (lambda (cmd)
+                                  (search-input-file inputs
+                                                     (string-append "bin/" cmd)))
+                                dependencies))
+                     (bindirs (map dirname pkgs)))
+                (with-directory-excursion (string-append #$output "/bin")
+                  (for-each (cute wrap-program <>
+                                  `("PATH" ":" prefix ,bindirs))
+                            (find-files ".")))))))))
     (home-page "https://www.freedesktop.org/wiki/Software/xdg-utils/")
     (synopsis "Freedesktop.org scripts for desktop integration")
     (description "The xdg-utils package is a set of simple scripts that

base-commit: 475173e4f25ad6437ee770b83e741d759f5ce380
prerequisite-patch-id: 6c77c02a9116b9db83a420e293830eeb645714cb
prerequisite-patch-id: 6ceb021cda6c3102fd5a1998f888d645467c0935
prerequisite-patch-id: 408fa55e77c5d05cc349886e3e84d65b4cb703e2
-- 
2.49.0