[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/06: gnu: guix: Cross-build fixup for wrap-program.
From: |
guix-commits |
Subject: |
02/06: gnu: guix: Cross-build fixup for wrap-program. |
Date: |
Fri, 1 May 2020 03:02:11 -0400 (EDT) |
janneke pushed a commit to branch core-updates
in repository guix.
commit 38b9af7c92344a17b6680ebd2aeea14171f84a1c
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,
fixup the shebang generated by wrap-program.
[inputs]: When cross-compiling, include bash-minimal.
---
gnu/packages/package-management.scm | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/package-management.scm
b/gnu/packages/package-management.scm
index d0e607a..3360a3b 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'
@@ -259,7 +260,8 @@ $(prefix)/etc/init.d\n")))
(setenv "SHELL" (which "sh"))
#t))
(add-after 'install 'wrap-program
- (lambda* (#:key inputs native-inputs outputs
#:allow-other-keys)
+ (lambda* (#:key inputs native-inputs outputs target
+ #:allow-other-keys)
;; Make sure the 'guix' command finds GnuTLS,
;; Guile-JSON, and Guile-Git automatically.
(let* ((out (assoc-ref outputs "out"))
@@ -301,6 +303,11 @@ $(prefix)/etc/init.d\n")))
`("GUILE_LOAD_COMPILED_PATH" ":" prefix (,gopath))
`("GUIX_LOCPATH" ":" suffix (,locpath)))
+ (when target
+ ;; XXX Touching wrap-program rebuilds world
+ (let ((bash (assoc-ref inputs "bash")))
+ (substitute* (string-append out "/bin/guix")
+ (("^#!.*/bash") (string-append "#! " bash
"/bin/bash")))))
#t))))))
(native-inputs `(("pkg-config" ,pkg-config)
@@ -346,7 +353,8 @@ $(prefix)/etc/init.d\n")))
`(("boot-guile/i686" ,(bootstrap-guile-origin "i686-linux")))
'())
,@(if (%current-target-system)
- `(("xz" ,xz))
+ `(("bash" ,bash-minimal)
+ ("xz" ,xz))
'())
;; Tests also rely on these bootstrap executables.
- branch core-updates updated (3dbfab4 -> 3eb4b46), guix-commits, 2020/05/01
- 01/06: gnu: guix: Use gnutls-3.6.13 when cross-compiling., guix-commits, 2020/05/01
- 03/06: gnu: guix: Apply courage for the Hurd., guix-commits, 2020/05/01
- 05/06: system: hurd: Add less, which to %base-packages/hurd., guix-commits, 2020/05/01
- 06/06: system: hurd: Add /etc/group., guix-commits, 2020/05/01
- 02/06: gnu: guix: Cross-build fixup for wrap-program.,
guix-commits <=
- 04/06: gnu: guix: Update to 52b01cb700., guix-commits, 2020/05/01