[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
04/35: vm: 'qemu-image' preserves the cross-compilation target of the OS
From: |
guix-commits |
Subject: |
04/35: vm: 'qemu-image' preserves the cross-compilation target of the OS. |
Date: |
Thu, 28 May 2020 13:03:29 -0400 (EDT) |
janneke pushed a commit to branch wip-hurd-vm
in repository guix.
commit 0233a548147e3ed427113f8e2c484bfd6e9dbfb1
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
- 08/35: gnu: hurd: Update to upstream Hurd-reserved xattr index., (continued)
- 08/35: gnu: hurd: Update to upstream Hurd-reserved xattr index., guix-commits, 2020/05/28
- 09/35: bootloader: Add 'disk-image-installer'., guix-commits, 2020/05/28
- 16/35: image: Do not use VM to create disk-images., guix-commits, 2020/05/28
- 21/35: system: Add 'hurd' field to <operating-system>., guix-commits, 2020/05/28
- 23/35: system: Add 'multiboot-modules' field to <boot-parameters>., guix-commits, 2020/05/28
- 25/35: system: Use 'hurd' package in label., guix-commits, 2020/05/28
- 26/35: system: examples: Add bare-hurd.tmpl., guix-commits, 2020/05/28
- 29/35: services: hurd: Use activation-service, hurd-etc-service., guix-commits, 2020/05/28
- 31/35: services: Add `hurd-console-service-type'., guix-commits, 2020/05/28
- 32/35: services: Add `hurd-getty-service-type'., guix-commits, 2020/05/28
- 04/35: vm: 'qemu-image' preserves the cross-compilation target of the OS.,
guix-commits <=
- 10/35: bootloader: grub: Do not run grub-install when creating a disk-image., guix-commits, 2020/05/28
- 12/35: image: Add bootloader installation support., guix-commits, 2020/05/28
- 19/35: image: Support extra-directives, add hurd-directives., guix-commits, 2020/05/28
- 20/35: system: hurd: Add hurd-default-essential-services., guix-commits, 2020/05/28
- 22/35: bootloader: Extend `<menu-entry>' for multiboot., guix-commits, 2020/05/28
- 27/35: services: hurd: Add `hurd-etc-service'., guix-commits, 2020/05/28
- 11/35: bootloader: grub: Use inheritance to define grub-minimal-bootloader., guix-commits, 2020/05/28
- 24/35: bootloader: grub: Add support for multiboot., guix-commits, 2020/05/28
- 28/35: system: Add `hurd-activation'., guix-commits, 2020/05/28
- 30/35: gnu: hurd: Create minimal "runsystem" script to invoke "rc"., guix-commits, 2020/05/28