guix_mirror_bot pushed a commit to branch master
in repository guix.

commit a74c5ba617a9e8da2917ab6315f223c93e9d4e99
Author: Jelle Licht <[email protected]>
AuthorDate: Wed Sep 9 15:46:00 2026 +0200

    gnu: icu4c-73: Fix cross-compilation for all package variants.
    
    * gnu/packages/icu4c.scm (icu4c-build-root-from): New function.
    (icu4c-73)[native-inputs]: Use it instead of 'icu4c-build-root'.
    (icu4c-build-root): Remove variable.
    
    Change-Id: Id3df0b63657a49fb312ccff54a60f53739c99d31
---
 gnu/packages/icu4c.scm | 36 +++++++++++++++++++-----------------
 1 file changed, 19 insertions(+), 17 deletions(-)

diff --git a/gnu/packages/icu4c.scm b/gnu/packages/icu4c.scm
index 68a7421b51d..25dcf15b55e 100644
--- a/gnu/packages/icu4c.scm
+++ b/gnu/packages/icu4c.scm
@@ -37,6 +37,7 @@
   #:use-module (gnu packages python)
   #:use-module (guix gexp)
   #:use-module (guix licenses)
+  #:use-module (guix memoization)
   #:use-module (guix packages)
   #:use-module (guix utils)
   #:use-module (guix download)
@@ -77,7 +78,7 @@
              (if (%current-target-system)
                  ;; When cross-compiling, this package needs a source directory
                  ;; of a native-build of itself.
-                 (list icu4c-build-root)
+                 (list (icu4c-build-root-from this-package))
                  '())))
     (inputs
      (list perl))
@@ -204,22 +205,23 @@ C/C++ part.")
          "icu4c-78-double-conversion.patch"
          "icu4c-suppress-warnings.patch"))))))
 
-(define-public icu4c-build-root
-  (package
-    (inherit icu4c)
-    (name "icu4c-build-root")
-    (arguments
-     (substitute-keyword-arguments arguments
-       ((#:tests? _ #f)
-         #f)
-        ((#:out-of-source? _ #t)
-         #t)
-        ((#:phases phases)
-         #~(modify-phases #$phases
-             (replace 'install
-               (lambda _
-                 (copy-recursively "../build" #$output)))))))
-    (native-inputs '())))
+(define icu4c-build-root-from
+  (mlambdaq (p)
+    (package
+      (inherit p)
+      (name "icu4c-build-root")
+      (arguments
+       (substitute-keyword-arguments arguments
+         ((#:tests? _ #f)
+          #f)
+         ((#:out-of-source? _ #t)
+          #t)
+         ((#:phases phases)
+          #~(modify-phases #$phases
+              (replace 'install
+                (lambda _
+                  (copy-recursively "../build" #$output)))))))
+      (native-inputs '()))))
 
 (define-public java-icu4j
   (package

Reply via email to