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'.master
parent
56389433bc
commit
569c55bee2
|
@ -180,10 +180,23 @@
|
||||||
$(prefix)/etc/init.d\n")))
|
$(prefix)/etc/init.d\n")))
|
||||||
|
|
||||||
(invoke "sh" "bootstrap")))
|
(invoke "sh" "bootstrap")))
|
||||||
|
(add-before 'build 'use-host-compressors
|
||||||
|
(lambda* (#:key inputs target #:allow-other-keys)
|
||||||
|
(when target
|
||||||
|
;; Use host compressors.
|
||||||
|
(let ((bzip2 (assoc-ref inputs "bzip2"))
|
||||||
|
(gzip (assoc-ref inputs "gzip"))
|
||||||
|
(xz (assoc-ref inputs "xz")))
|
||||||
|
(substitute* "guix/config.scm"
|
||||||
|
(("\"[^\"]*/bin/bzip2")
|
||||||
|
(string-append "\"" bzip2 "/bin/bzip2"))
|
||||||
|
(("\"[^\"]*/bin/gzip") gzip
|
||||||
|
(string-append "\"" gzip "/bin/gzip"))
|
||||||
|
(("\"[^\"]*/bin//xz")
|
||||||
|
(string-append "\"" xz "/bin/xz")))))
|
||||||
|
#t))
|
||||||
(add-before 'check 'copy-bootstrap-guile
|
(add-before 'check 'copy-bootstrap-guile
|
||||||
(lambda* (#:key system target inputs #:allow-other-keys)
|
(lambda* (#:key system target inputs #:allow-other-keys)
|
||||||
(unless target
|
|
||||||
(begin
|
|
||||||
;; Copy the bootstrap guile tarball in the store
|
;; Copy the bootstrap guile tarball in the store
|
||||||
;; used by the test suite.
|
;; used by the test suite.
|
||||||
(define (intern file recursive?)
|
(define (intern file recursive?)
|
||||||
|
@ -209,6 +222,7 @@ $(prefix)/etc/init.d\n")))
|
||||||
(invoke "./test-env" "guile" "-c"
|
(invoke "./test-env" "guile" "-c"
|
||||||
(object->string code)))
|
(object->string code)))
|
||||||
|
|
||||||
|
(unless target
|
||||||
(intern (assoc-ref inputs "boot-guile") #f)
|
(intern (assoc-ref inputs "boot-guile") #f)
|
||||||
|
|
||||||
;; On x86_64 some tests need the i686 Guile.
|
;; On x86_64 some tests need the i686 Guile.
|
||||||
|
@ -222,7 +236,7 @@ $(prefix)/etc/init.d\n")))
|
||||||
(for-each (lambda (input)
|
(for-each (lambda (input)
|
||||||
(intern (assoc-ref inputs input) #t))
|
(intern (assoc-ref inputs input) #t))
|
||||||
'("bootstrap/bash" "bootstrap/mkdir"
|
'("bootstrap/bash" "bootstrap/mkdir"
|
||||||
"bootstrap/tar" "bootstrap/xz"))))
|
"bootstrap/tar" "bootstrap/xz")))
|
||||||
#t))
|
#t))
|
||||||
(add-after 'unpack 'disable-failing-tests
|
(add-after 'unpack 'disable-failing-tests
|
||||||
;; XXX FIXME: These tests fail within the build container.
|
;; XXX FIXME: These tests fail within the build container.
|
||||||
|
@ -331,6 +345,9 @@ $(prefix)/etc/init.d\n")))
|
||||||
(string=? (%current-system) "x86_64-linux"))
|
(string=? (%current-system) "x86_64-linux"))
|
||||||
`(("boot-guile/i686" ,(bootstrap-guile-origin "i686-linux")))
|
`(("boot-guile/i686" ,(bootstrap-guile-origin "i686-linux")))
|
||||||
'())
|
'())
|
||||||
|
,@(if (%current-target-system)
|
||||||
|
`(("xz" ,xz))
|
||||||
|
'())
|
||||||
|
|
||||||
;; Tests also rely on these bootstrap executables.
|
;; Tests also rely on these bootstrap executables.
|
||||||
("bootstrap/bash" ,(bootstrap-executable "bash" (%current-system)))
|
("bootstrap/bash" ,(bootstrap-executable "bash" (%current-system)))
|
||||||
|
|
Reference in New Issue