guix_mirror_bot pushed a commit to branch master
in repository guix.

commit e4986719586e35182e21eba36fcf2062427e33db
Author: dan <[email protected]>
AuthorDate: Fri Dec 12 15:50:14 2025 +0800

    gnu: Add xdg-desktop-portal-next.
    
    * gnu/packages/freedesktop.scm (xdg-desktop-portal-next): New variable.
    *
    
gnu/packages/patches/xdg-desktop-portal-1.20.3-disable-configuration-search-exit.patch:
    New file.
    * gnu/local.mk (dist_patch_DATA): Register it.
    
    Change-Id: I83c7d1c174a258761988b4d234b6fc4a9228e36f
    Signed-off-by: Ludovic Courtès <[email protected]>
---
 gnu/local.mk                                       |  1 +
 gnu/packages/freedesktop.scm                       | 35 ++++++++++++++++++++++
 ...-1.20.3-disable-configuration-search-exit.patch | 27 +++++++++++++++++
 3 files changed, 63 insertions(+)

diff --git a/gnu/local.mk b/gnu/local.mk
index eac1752680..82d1acd825 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -2493,6 +2493,7 @@ dist_patch_DATA =                                         
\
   %D%/packages/patches/x265-4-arm-flags.patch                  \
   %D%/packages/patches/xdg-desktop-portal-disable-portal-tests.patch\
   
%D%/packages/patches/xdg-desktop-portal-disable-configuration-search-exit.patch\
+  
%D%/packages/patches/xdg-desktop-portal-1.20.3-disable-configuration-search-exit.patch\
   %D%/packages/patches/xdg-desktop-portal-wlr-harcoded-length.patch\
   %D%/packages/patches/xf86-video-siliconmotion-fix-ftbfs.patch \
   %D%/packages/patches/xfig-Enable-error-message-for-missing-libraries.patch   
        \
diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index f8c7cd581f..a80f1f0583 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -3251,6 +3251,41 @@ The portal interfaces include APIs for file access, 
opening URIs, printing
 and others.")
     (license license:lgpl2.1+)))
 
+(define-public xdg-desktop-portal-next
+  (let ((base xdg-desktop-portal))
+    (package
+      (inherit base)
+      (version "1.20.3")
+      (source
+       (origin
+         (method url-fetch)
+         (uri (string-append
+               
"https://github.com/flatpak/xdg-desktop-portal/releases/download/";
+               version "/xdg-desktop-portal-" version ".tar.xz"))
+         (sha256
+          (base32
+           "1p4yvbhqr8yf231gm69vdz3h7na8m6x1mhiw3bmhg4gm6x4idysb"))
+         (patches (search-patches
+                   
"xdg-desktop-portal-1.20.3-disable-configuration-search-exit.patch"))
+         (modules '((guix build utils)))
+         ;; Disable failing tests.
+         (snippet #~(substitute* "tests/meson.build"
+                      ((".*test_dynamiclauncher.*") "")
+                      ((".*test_notification.*") "")
+                      ((".*test_usb.*") "")))))
+      (arguments
+       (substitute-keyword-arguments (package-arguments base)
+         ((#:configure-flags flags #~'())
+          ;; Requires python-furo, which isn't packaged for guix, and depends
+          ;; on node.js.
+          #~(append '("-Ddocumentation=disabled")
+                    #$flags))))
+      (inputs (modify-inputs (package-inputs base)
+                (append gstreamer
+                        gst-plugins-base
+                        gst-plugins-good
+                        umockdev))))))
+
 (define-public xdg-desktop-portal-gtk
   (package
     (name "xdg-desktop-portal-gtk")
diff --git 
a/gnu/packages/patches/xdg-desktop-portal-1.20.3-disable-configuration-search-exit.patch
 
b/gnu/packages/patches/xdg-desktop-portal-1.20.3-disable-configuration-search-exit.patch
new file mode 100644
index 0000000000..654b40db9e
--- /dev/null
+++ 
b/gnu/packages/patches/xdg-desktop-portal-1.20.3-disable-configuration-search-exit.patch
@@ -0,0 +1,27 @@
+From 37003d1f99246c88cbe7cf2f83616642e0fdf3fb Mon Sep 17 00:00:00 2001
+From: Rodion Goritskov <[email protected]>
+Date: Fri, 27 Sep 2024 00:44:07 +0400
+Subject: [PATCH] portal-impl: Check if there are any configuration files in 
XDG_DESKTOP_PORTAL_DIR before exiting configuration search
+
+---
+ src/xdp-portal-impl.c | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/src/xdp-portal-impl.c b/src/xdp-portal-impl.c
+index 8c1fd53..8708409 100644
+--- a/src/xdp-portal-impl.c
++++ b/src/xdp-portal-impl.c
+@@ -438,9 +438,8 @@ load_portal_configuration (gboolean opt_verbose)
+ 
+   if (portal_dir != NULL)
+     {
+-      load_config_directory (portal_dir, desktops, opt_verbose);
+-      /* All other config directories are ignored when this is set */
+-      return;
++      if (load_config_directory (portal_dir, desktops, opt_verbose))
++      return;
+     }
+ 
+   /* $XDG_CONFIG_HOME/xdg-desktop-portal/(DESKTOP-)portals.conf */
+-- 
+2.46.0

Reply via email to