guix-commits
[Top][All Lists]
Advanced

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

05/10: gnu: guix: Cross-build fix: override compressors.


From: guix-commits
Subject: 05/10: gnu: guix: Cross-build fix: override compressors.
Date: Sat, 11 Apr 2020 16:27:37 -0400 (EDT)

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

commit 70be3ee740eb8fdc7984e33acde8409fd073e897
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 3394807..7808e7d 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]