[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
49/52: DRAFT gnu: guix: Cross-compilation fixup for wrap-program.
From: |
guix-commits |
Subject: |
49/52: DRAFT gnu: guix: Cross-compilation fixup for wrap-program. |
Date: |
Thu, 9 Apr 2020 13:29:15 -0400 (EDT) |
janneke pushed a commit to branch wip-hurd-vm
in repository guix.
commit 44bd578d873f431060b9c2b701189a8532da934b
Author: Jan (janneke) Nieuwenhuizen <address@hidden>
AuthorDate: Wed Apr 8 09:43:51 2020 +0200
DRAFT gnu: guix: Cross-compilation fixup for wrap-program.
XXX Should fix 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 722b3cb..4d91d71 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'
@@ -192,6 +193,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))))
'())
,@(if (hurd-target?)
@@ -367,6 +376,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))
- 42/52: gnu: libdaemon: Cross-build with --localstatedir=/var., (continued)
- 42/52: gnu: libdaemon: Cross-build with --localstatedir=/var., guix-commits, 2020/04/09
- 40/52: system: hurd: Add root profile., guix-commits, 2020/04/09
- 45/52: system: hurd: Add net-base and inetutils., guix-commits, 2020/04/09
- 39/52: gnu: guile-json: Cross-build fix., guix-commits, 2020/04/09
- 48/52: REMOVEME gnu: guix: Bugfix for cross compiling to the Hurd., guix-commits, 2020/04/09
- 51/52: DRAFT daemon: Create wrapper for mount (2)., guix-commits, 2020/04/09
- 50/52: DRAFT gnu: hurd: Add `libhurdutil' patch., guix-commits, 2020/04/09
- 46/52: system: hurd: Add guile-candy., guix-commits, 2020/04/09
- 44/52: system: hurd: Create a proper profile., guix-commits, 2020/04/09
- 47/52: system: hurd: Ensure propagated inputs are also cross-built., guix-commits, 2020/04/09
- 49/52: DRAFT gnu: guix: Cross-compilation fixup for wrap-program.,
guix-commits <=
- 52/52: HACK gnu: guix: Bump to HEAD~1: daemon: Create wrapper for mount (2)., guix-commits, 2020/04/09