Subject: [bug#73927] [PATCH v3 01/17] gnu: guile-fibers: Fix cross-build for the Hurd.

From: Janneke Nieuwenhuizen <[email-masked]>
Date: Fri, 25 Oct 2024 11:39:53 +0200

* gnu/packages/guile-xyz.scm (guile-fibers): When cross-building for the Hurd,
add "fix-env" phase.

Change-Id: Iebe12941bbfb2f5a6208f9364115e95f10e82ed6
---
 gnu/packages/guile-xyz.scm | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index 5f34ea98a6..06d3b59dc3 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -9,7 +9,7 @@
 ;;; Copyright © 2016, 2017, 2021 Alex Kost <[email-masked]>
 ;;; Copyright © 2016, 2017 Adonay "adfeno" Felipe Nogueira <https://libreplanet.org/wiki/User:Adfeno> <[email-masked]>
 ;;; Copyright © 2016, 2021 Amirouche <[email-masked]>
-;;; Copyright © 2016, 2019, 2021, 2023 Janneke Nieuwenhuizen <[email-masked]>
+;;; Copyright © 2016, 2019, 2021, 2023, 2024 Janneke Nieuwenhuizen <[email-masked]>
 ;;; Copyright © 2017 Andy Wingo <[email-masked]>
 ;;; Copyright © 2017 David Thompson <[email-masked]>
 ;;; Copyright © 2017, 2018, 2019, 2020 Mathieu Othacehe <[email-masked]>
@@ -875,7 +875,14 @@ (define-public guile-fibers
                          (substitute* "tests/basic.scm"
                            ((".*spawn-fiber-chain 5000000.*") ""))
                          (substitute* "tests/channels.scm"
-                           ((".*assert-run-fibers-terminates .*pingpong.*") "")))))))))
+                           ((".*assert-run-fibers-terminates .*pingpong.*") "")))))
+                   #$@(if (and (target-hurd?) (%current-target-system))
+                          #~((add-before 'build 'fixup-env
+                               (lambda _
+                                 (substitute* "env"
+                                   ((".*override.*" all)
+                                    (string-append "true #" all))))))
+                          '())))))
     (native-inputs
      (list texinfo pkg-config autoconf-2.71 automake libtool
            guile-3.0            ;for 'guild compile
-- 
2.46.0