guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

07/42: gnu: guix: Cross-build fix: override compressors.


From: guix-commits
Subject: 07/42: gnu: guix: Cross-build fix: override compressors.
Date: Sat, 25 Apr 2020 13:45:01 -0400 (EDT)

janneke pushed a commit to branch wip-hurd-vm
in repository guix.

commit eeb87326d891e0f88f5eebf767d97b45c3e6bbbb
Author: Jan (janneke) Nieuwenhuizen <address@hidden>
AuthorDate: Fri Apr 10 21:24:19 2020 +0200

    gnu: guix: Cross-build fix: override compressors.
    
    * gnu/packages/package-management.scm (guix)[arguments]: When 
cross-compiling,
    add `fixup-compressors' stage.
    [inputs]: When cross-compiling, add `xz'.
---
 gnu/packages/package-management.scm | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/package-management.scm 
b/gnu/packages/package-management.scm
index e2b26ce..82c144b 100644
--- a/gnu/packages/package-management.scm
+++ b/gnu/packages/package-management.scm
@@ -191,6 +191,20 @@ $(prefix)/etc/init.d\n")))
                                       (bash (assoc-ref inputs "bash")))
                                   (substitute* (string-append out "/bin/guix")
                                     (("^#!.*/bash") (string-append "#! " bash 
"/bin/bash")))
+                                  #t)))
+                            (add-before 'build 'fixup-compressors
+                              (lambda* (#:key inputs #:allow-other-keys)
+                                ;; Use host compressors.
+                                (let ((bzip2 (assoc-ref inputs "bzip2"))
+                                      (gzip (assoc-ref inputs "gzip"))
+                                      (xz (assoc-ref inputs "xz")))
+                                  (substitute* "guix/config.scm"
+                                    (("/gnu/store/.*/bzip2")
+                                     (string-append bzip2 "/bin/bzip2"))
+                                    (("/gnu/store/.*/gzip") gzip
+                                     (string-append gzip "/bin/gzip"))
+                                    (("/gnu/store/.*/xz")
+                                     (string-append xz "/bin/xz")))
                                   #t))))
                           `((add-before 'check 'copy-bootstrap-guile
                               (lambda* (#:key system inputs #:allow-other-keys)
@@ -342,7 +356,8 @@ $(prefix)/etc/init.d\n")))
                `(("boot-guile/i686" ,(bootstrap-guile-origin "i686-linux")))
                '())
          ,@(if (%current-target-system)
-               `(("bash" ,bash-minimal))
+               `(("bash" ,bash-minimal)
+                 ("xz" ,xz))
                '())
 
          ;; Tests also rely on these bootstrap executables.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]