[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
07/36: gnu: guix: Cross-build fixup for wrap-program.
From: |
guix-commits |
Subject: |
07/36: gnu: guix: Cross-build fixup for wrap-program. |
Date: |
Fri, 24 Apr 2020 08:14:06 -0400 (EDT) |
janneke pushed a commit to branch wip-hurd-vm
in repository guix.
commit fcc40787d29a8ca10bfa93656d2ef4c8bef0b1f7
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 | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/package-management.scm
b/gnu/packages/package-management.scm
index 94003fa..69d325a 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'
@@ -183,7 +184,14 @@ $(prefix)/etc/init.d\n")))
(invoke "sh" "bootstrap")))
,@(if (%current-target-system)
- '()
+ `((add-after 'wrap-program
'wrap-program:substitute-host-bash
+ (lambda* (#:key inputs outputs
#:allow-other-keys)
+ ;; XXX Touching wrap-program rebuilds world
+ (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
(lambda* (#:key system inputs #:allow-other-keys)
;; Copy the bootstrap guile tarball in the
store used
@@ -333,6 +341,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" (%current-system)))
- branch wip-hurd-vm created (now 6c9efcd), guix-commits, 2020/04/24
- 04/36: gnu: guix: Do not copy bootstrap-guile when cross-compiling., guix-commits, 2020/04/24
- 01/36: compile: Pre-load the compiler outside 'with-target'., guix-commits, 2020/04/24
- 09/36: gnu: guix: Cross-build fix: override compressors., guix-commits, 2020/04/24
- 07/36: gnu: guix: Cross-build fixup for wrap-program.,
guix-commits <=
- 05/36: gnu: guix: Indent `copy-bootstrap-guile' code., guix-commits, 2020/04/24
- 06/36: gnu: guix: Cross-build workaround: Run native guile for version., guix-commits, 2020/04/24
- 14/36: gnu: hurd: Use default Qemu guest ip: 10.0.2.15., guix-commits, 2020/04/24
- 10/36: gnu: guix: Run `make update-guix-package'., guix-commits, 2020/04/24
- 11/36: vm: Make the device node procedure a parameter., guix-commits, 2020/04/24
- 12/36: gnu: hurd: Build DDE libraries., guix-commits, 2020/04/24
- 17/36: gnu: hurd: Add NFS support., guix-commits, 2020/04/24
- 19/36: system: hurd: Add less, which to %base-packages/hurd., guix-commits, 2020/04/24
- 03/36: gnu: guix: Apply courage for the Hurd., guix-commits, 2020/04/24
- 15/36: gnu: Add dde-sources., guix-commits, 2020/04/24