[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
40/48: gnu: guix: Cross-build fixup for wrap-program.
From: |
guix-commits |
Subject: |
40/48: gnu: guix: Cross-build fixup for wrap-program. |
Date: |
Sun, 19 Apr 2020 10:22:18 -0400 (EDT) |
janneke pushed a commit to branch wip-hurd-vm
in repository guix.
commit b9bbde668e01f3fd614472343a7cfa3fcfb293d8
Author: Jan (janneke) Nieuwenhuizen <address@hidden>
AuthorDate: Wed Apr 8 09:43:51 2020 +0200
gnu: guix: Cross-build fixup for wrap-program.
This allows running:
guix build hello
* gnu/packages/package-management.scm (guix)[arguments]: When
cross-compiling,
add 'wrap-program:substitute-host-bash phase to fixup the shebang generated
by
wrap-program.
[inputs]: When cross-compiling, include bash-minimal.
---
gnu/packages/package-management.scm | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/gnu/packages/package-management.scm
b/gnu/packages/package-management.scm
index d8bcfa5..060b654 100644
--- a/gnu/packages/package-management.scm
+++ b/gnu/packages/package-management.scm
@@ -37,6 +37,7 @@
#:use-module (gnu packages autotools)
#:use-module (gnu packages backup)
#:use-module (gnu packages base)
+ #:use-module (gnu packages bash)
#:use-module (gnu packages bdw-gc)
#:use-module (gnu packages bison)
#:use-module (gnu packages bootstrap) ;for 'bootstrap-guile-origin'
@@ -190,6 +191,14 @@ $(prefix)/etc/init.d\n")))
(string-append "LANGUAGE= PATH="
self "/bin"
":" (getenv "PATH"))))
+ #t)))
+ ;; XXX Touching wrap-program rebuilds world
+ (add-after 'wrap-program
'wrap-program:substitute-host-bash
+ (lambda* (#:key inputs outputs
#:allow-other-keys)
+ (let ((out (assoc-ref outputs "out"))
+ (bash (assoc-ref inputs "bash")))
+ (substitute* (string-append out "/bin/guix")
+ (("^#!.*/bash") (string-append "#! " bash
"/bin/bash")))
#t))))
'())
(add-before 'check 'copy-bootstrap-guile
@@ -355,6 +364,9 @@ $(prefix)/etc/init.d\n")))
(string=? (%current-system) "x86_64-linux"))
`(("boot-guile/i686" ,(bootstrap-guile-origin "i686-linux")))
'())
+ ,@(if (%current-target-system)
+ `(("bash" ,bash-minimal))
+ '())
;; Tests also rely on these bootstrap executables.
("bootstrap/bash" ,(bootstrap-executable "bash" target))
- 46/48: Revert "records: Have ABI check work well for cross-compilation.", (continued)
- 46/48: Revert "records: Have ABI check work well for cross-compilation.", guix-commits, 2020/04/19
- 48/48: gnu: guix: Run `make update-guix-package'., guix-commits, 2020/04/19
- 10/48: system: hurd: Add /etc/group., guix-commits, 2020/04/19
- 09/48: gnu: hurd: Use default Qemu guest ip: 10.0.2.15., guix-commits, 2020/04/19
- 16/48: services: Add hurd-console-service-type., guix-commits, 2020/04/19
- 24/48: HACK use uncompiled .scm for shepherd, guix-commits, 2020/04/19
- 33/48: gnu: cmake: Remove "libuv" dependency for the Hurd., guix-commits, 2020/04/19
- 41/48: gnu: guix: Cross-build fix: override compressors., guix-commits, 2020/04/19
- 23/48: system: hurd: Add the Shepherd., guix-commits, 2020/04/19
- 27/48: system: hurd: Add less, which to %base-packages/hurd., guix-commits, 2020/04/19
- 40/48: gnu: guix: Cross-build fixup for wrap-program.,
guix-commits <=
- 45/48: Revert "compile: Run the load phase within 'with-target'.", guix-commits, 2020/04/19