[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
04/28: vm: 'qemu-image' preserves the cross-compilation target of the OS
From: |
guix-commits |
Subject: |
04/28: vm: 'qemu-image' preserves the cross-compilation target of the OS. |
Date: |
Sat, 30 May 2020 11:20:12 -0400 (EDT) |
janneke pushed a commit to branch wip-hurd-vm
in repository guix.
commit d43423f074c45b01a3711b7a8c219e416eeabf85
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Thu May 28 00:37:33 2020 +0200
vm: 'qemu-image' preserves the cross-compilation target of the OS.
* gnu/system/vm.scm (qemu-image)[preserve-target, inputs*]: New variables.
In gexp, use INPUTS* instead of INPUTS. Wrap OS and BOOTCFG-DRV in
'preserve-target'. Pass INPUTS* instead of INPUTS as the
#:references-graphs.
---
gnu/system/vm.scm | 23 +++++++++++++++++++----
1 file changed, 19 insertions(+), 4 deletions(-)
diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm
index c7767db..991ea2d 100644
--- a/gnu/system/vm.scm
+++ b/gnu/system/vm.scm
@@ -317,6 +317,21 @@ system that is passed to 'populate-root-file-system'."
(local-file (search-path %load-path
"guix/store/schema.sql"))))
+ (define preserve-target
+ (if target
+ (lambda (obj)
+ (with-parameters ((%current-target-system target))
+ obj))
+ identity))
+
+ (define inputs*
+ (map (match-lambda
+ ((name thing)
+ `(,name ,(preserve-target thing)))
+ ((name thing output)
+ `(,name ,(preserve-target thing) ,output)))
+ inputs))
+
(expression->derivation-in-linux-vm
name
(with-extensions gcrypt-sqlite3&co
@@ -355,7 +370,7 @@ system that is passed to 'populate-root-file-system'."
'#$(map (match-lambda
((name thing) thing)
((name thing output) `(,thing ,output)))
- inputs)))
+ inputs*)))
(set-path-environment-variable "PATH" '("bin" "sbin") inputs)
@@ -367,7 +382,7 @@ system that is passed to 'populate-root-file-system'."
#:closures graphs
#:copy-closures? #$copy-inputs?
#:register-closures? #$register-closures?
- #:system-directory #$os
+ #:system-directory #$(preserve-target os)
#:make-device-nodes
#$(match device-nodes
@@ -423,7 +438,7 @@ system that is passed to 'populate-root-file-system'."
#:grub-efi grub-efi
#:bootloader-package
#+(bootloader-package bootloader)
- #:bootcfg #$bootcfg-drv
+ #:bootcfg #$(preserve-target bootcfg-drv)
#:bootcfg-location
#$(bootloader-configuration-file
bootloader)
#:bootloader-installer
@@ -432,7 +447,7 @@ system that is passed to 'populate-root-file-system'."
#:make-disk-image? #t
#:disk-image-size disk-image-size
#:disk-image-format disk-image-format
- #:references-graphs inputs
+ #:references-graphs inputs*
#:substitutable? substitutable?))
(define* (system-docker-image os
- branch wip-hurd-vm created (now b73d83f), guix-commits, 2020/05/30
- 03/28: vm: 'qemu-image' uses the native partitioning tools and bootloader., guix-commits, 2020/05/30
- 05/28: vm: <virtual-machine> compiler honors system and target., guix-commits, 2020/05/30
- 08/28: gnu: hurd: Update to upstream Hurd-reserved xattr index., guix-commits, 2020/05/30
- 14/28: bootloader: Extend `<menu-entry>' for multiboot., guix-commits, 2020/05/30
- 01/28: system: 'system-linux-image-file-name' takes an optional parameter., guix-commits, 2020/05/30
- 04/28: vm: 'qemu-image' preserves the cross-compilation target of the OS.,
guix-commits <=
- 02/28: vm: 'expression->derivation-in-linux-vm' always returns a native build., guix-commits, 2020/05/30
- 07/28: gnu: guile-static: Disable JIT on ARMv7., guix-commits, 2020/05/30
- 09/28: image: Add Hurd support., guix-commits, 2020/05/30
- 06/28: vm: Shared-store script runs that native QEMU and Bash., guix-commits, 2020/05/30
- 10/28: linux-boot: Update 'make-hurd-device-nodes'., guix-commits, 2020/05/30
- 11/28: image: Support extra-directives, add hurd-directives., guix-commits, 2020/05/30
- 12/28: system: hurd: Add hurd-default-essential-services., guix-commits, 2020/05/30
- 15/28: system: Add 'multiboot-modules' field to <boot-parameters>., guix-commits, 2020/05/30
- 18/28: system: examples: Add bare-hurd.tmpl., guix-commits, 2020/05/30
- 13/28: system: Add 'hurd' field to <operating-system>., guix-commits, 2020/05/30