guix-commits
[Top][All Lists]
Advanced

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

41/48: gnu: guix: Cross-build fix: override compressors.


From: guix-commits
Subject: 41/48: gnu: guix: Cross-build fix: override compressors.
Date: Sun, 19 Apr 2020 10:22:18 -0400 (EDT)

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

commit a8a6180e60ddde9795e306a9fd4675c60da09b8f
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 | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/package-management.scm 
b/gnu/packages/package-management.scm
index 060b654..9c33003 100644
--- a/gnu/packages/package-management.scm
+++ b/gnu/packages/package-management.scm
@@ -199,6 +199,21 @@ $(prefix)/etc/init.d\n")))
                                       (bash (assoc-ref inputs "bash")))
                                   (substitute* (string-append out "/bin/guix")
                                     (("^#!.*/bash") (string-append "#! " bash 
"/bin/bash")))
+                                  #t)))
+                            ;; Use host compressors.
+                            (add-before 'build 'fixup-compressors
+                              (lambda* (#:key inputs #:allow-other-keys)
+                                (format #t "FOO: inputs:~s\n" inputs)
+                                (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
@@ -365,7 +380,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]