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.
This commit is contained in:
parent
96cb3f8a29
commit
52c1b90a5a
1 changed files with 19 additions and 4 deletions
|
@ -317,6 +317,21 @@ (define schema
|
||||||
(local-file (search-path %load-path
|
(local-file (search-path %load-path
|
||||||
"guix/store/schema.sql"))))
|
"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
|
(expression->derivation-in-linux-vm
|
||||||
name
|
name
|
||||||
(with-extensions gcrypt-sqlite3&co
|
(with-extensions gcrypt-sqlite3&co
|
||||||
|
@ -355,7 +370,7 @@ (define schema
|
||||||
'#$(map (match-lambda
|
'#$(map (match-lambda
|
||||||
((name thing) thing)
|
((name thing) thing)
|
||||||
((name thing output) `(,thing ,output)))
|
((name thing output) `(,thing ,output)))
|
||||||
inputs)))
|
inputs*)))
|
||||||
|
|
||||||
(set-path-environment-variable "PATH" '("bin" "sbin") inputs)
|
(set-path-environment-variable "PATH" '("bin" "sbin") inputs)
|
||||||
|
|
||||||
|
@ -367,7 +382,7 @@ (define schema
|
||||||
#:closures graphs
|
#:closures graphs
|
||||||
#:copy-closures? #$copy-inputs?
|
#:copy-closures? #$copy-inputs?
|
||||||
#:register-closures? #$register-closures?
|
#:register-closures? #$register-closures?
|
||||||
#:system-directory #$os
|
#:system-directory #$(preserve-target os)
|
||||||
|
|
||||||
#:make-device-nodes
|
#:make-device-nodes
|
||||||
#$(match device-nodes
|
#$(match device-nodes
|
||||||
|
@ -423,7 +438,7 @@ (define schema
|
||||||
#:grub-efi grub-efi
|
#:grub-efi grub-efi
|
||||||
#:bootloader-package
|
#:bootloader-package
|
||||||
#+(bootloader-package bootloader)
|
#+(bootloader-package bootloader)
|
||||||
#:bootcfg #$bootcfg-drv
|
#:bootcfg #$(preserve-target bootcfg-drv)
|
||||||
#:bootcfg-location
|
#:bootcfg-location
|
||||||
#$(bootloader-configuration-file bootloader)
|
#$(bootloader-configuration-file bootloader)
|
||||||
#:bootloader-installer
|
#:bootloader-installer
|
||||||
|
@ -432,7 +447,7 @@ (define schema
|
||||||
#:make-disk-image? #t
|
#:make-disk-image? #t
|
||||||
#:disk-image-size disk-image-size
|
#:disk-image-size disk-image-size
|
||||||
#:disk-image-format disk-image-format
|
#:disk-image-format disk-image-format
|
||||||
#:references-graphs inputs
|
#:references-graphs inputs*
|
||||||
#:substitutable? substitutable?))
|
#:substitutable? substitutable?))
|
||||||
|
|
||||||
(define* (system-docker-image os
|
(define* (system-docker-image os
|
||||||
|
|
Loading…
Reference in a new issue