guix_mirror_bot pushed a commit to branch master
in repository guix.
commit 45a0e435d35df99e925c45df6841c1bbca00d60a
Author: Maxim Cournoyer <[email protected]>
AuthorDate: Sat Aug 29 16:50:53 2026 +0900
gnu: guile-gi: Fix main-loop test.
* gnu/packages/guile-xyz.scm (guile-gi) [source]: Apply patch.
* gnu/packages/patches/guile-gi-main-loop-test.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
---
gnu/local.mk | 1 +
gnu/packages/guile-xyz.scm | 3 +-
gnu/packages/patches/guile-gi-main-loop-test.patch | 62 ++++++++++++++++++++++
3 files changed, 65 insertions(+), 1 deletion(-)
diff --git a/gnu/local.mk b/gnu/local.mk
index c2889ac22f..9c3ddb4fc1 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1586,6 +1586,7 @@ dist_patch_DATA =
\
%D%/packages/patches/guile-fix-invalid-unicode-handling.patch \
%D%/packages/patches/guile-gdbm-ffi-support-gdbm-1.14.patch \
%D%/packages/patches/guile-gi-fix-marshall-tests.patch \
+ %D%/packages/patches/guile-gi-main-loop-test.patch \
%D%/packages/patches/guile-hurd-posix-spawn.patch \
%D%/packages/patches/guile-lzlib-gcc-14.patch \
%D%/packages/patches/guile-lzlib-hurd64.patch \
diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index 644048a7b2..e65c8f291e 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -4886,7 +4886,8 @@ list of components. This module takes care of that for
you.")
(sha256
(base32
"1ndzqbgy5jbfm2fan6y31xfxdxglzjhgqib4c34b3w5inxzkrm6v"))
- (patches (search-patches
"guile-gi-fix-marshall-tests.patch"))))
+ (patches (search-patches "guile-gi-fix-marshall-tests.patch"
+ "guile-gi-main-loop-test.patch"))))
(build-system glib-or-gtk-build-system)
(arguments
(list
diff --git a/gnu/packages/patches/guile-gi-main-loop-test.patch
b/gnu/packages/patches/guile-gi-main-loop-test.patch
new file mode 100644
index 0000000000..7bf55dd4e3
--- /dev/null
+++ b/gnu/packages/patches/guile-gi-main-loop-test.patch
@@ -0,0 +1,62 @@
+Upstream-status: <https://github.com/spk121/guile-gi/pull/145>
+
+diff --git a/test/main-loop.scm b/test/main-loop.scm
+index 4a1d658..f97676d 100644
+--- a/test/main-loop.scm
++++ b/test/main-loop.scm
+@@ -7,6 +7,7 @@
+ (string-contains %host-type "-mingw32"))
+
+ (require "GLib" "2.0")
++(require "GLibUnix" "2.0")
+ (load-by-name "GLib" "IOCondition")
+ (load-by-name "GLib" "MainLoop")
+ (load-by-name "GLib" "MainContext")
+@@ -14,7 +15,7 @@
+ (load-by-name "GLib" "idle_add")
+ (load-by-name "GLib" "timeout_add")
+ (unless mingw?
+- (load-by-name "GLib" "unix_fd_add_full"))
++ (load-by-name "GLibUnix" "fd_add_full"))
+
+ (define loop #f)
+
+@@ -83,22 +84,22 @@
+ (display unix-fd-sample-text out-port)
+ (newline out-port)
+ (close out-port)
+- (unix-fd-add-full PRIORITY_DEFAULT
+- (port->fdes in-port)
+- (list->iocondition '(hup in))
+- (lambda (fd condition dummy)
+- (cond
+- ((flags-set? condition 'in)
+- (let* ((port (dup->inport fd))
+- (line (get-line port)))
+- (set! unix-fd-result line)
+- #t))
+- ((flags-set? condition 'hup)
+- ;; close in-port on SIGHUP
+- (close in-port)
+- #f)))
+- #f
+- (const #f)))))
++ (fd-add-full PRIORITY_DEFAULT
++ (port->fdes in-port)
++ (list->iocondition '(hup in))
++ (lambda (fd condition dummy)
++ (cond
++ ((flags-set? condition 'in)
++ (let* ((port (dup->inport fd))
++ (line (get-line port)))
++ (set! unix-fd-result line)
++ #t))
++ ((flags-set? condition 'hup)
++ ;; close in-port on SIGHUP
++ (close in-port)
++ #f)))
++ #f
++ (const #f)))))
+
+ (test-assert "run mainloop"
+ (begin