Pass #:system to channel-instances->manifest

This is better than setting the %current-system, since more of the process
will run as native code.
This commit is contained in:
Christopher Baines 2021-06-09 10:59:31 +01:00
parent 8a48960fa7
commit 1a21bc40a8

View file

@ -920,11 +920,10 @@ WHERE job_id = $1")
"guix-data-service: computing the derivation-file-name for ~A\n" "guix-data-service: computing the derivation-file-name for ~A\n"
system) system)
(parameterize ((%current-system system))
(let ((manifest (let ((manifest
(catch #t (catch #t
(lambda () (lambda ()
((channel-instances->manifest instances) store)) ((channel-instances->manifest instances #:system system) store))
(lambda (key . args) (lambda (key . args)
(simple-format (simple-format
(current-error-port) (current-error-port)
@ -953,10 +952,11 @@ WHERE job_id = $1")
(and manifest (and manifest
(add-tmp-root-and-return-drv (add-tmp-root-and-return-drv
(derivation-file-name (derivation-file-name
(parameterize ((%current-system system))
(run-with-store store (run-with-store store
(profile-derivation (profile-derivation
manifest manifest
#:hooks %channel-profile-hooks)))))) #:hooks %channel-profile-hooks)))))))
(lambda (key . args) (lambda (key . args)
(simple-format (simple-format
(current-error-port) (current-error-port)
@ -965,7 +965,7 @@ WHERE job_id = $1")
(simple-format (simple-format
(current-error-port) (current-error-port)
"error ~A: ~A\n" key args) "error ~A: ~A\n" key args)
#f)))))))) #f)))))))
(list ,@systems))))) (list ,@systems)))))
(let ((inferior (let ((inferior
@ -1015,7 +1015,7 @@ WHERE job_id = $1")
(guix grafts) (guix grafts)
(guix profiles)) (guix profiles))
inferior) inferior)
(inferior-eval '(when (defined? '%graft?) (%graft? #f)) (inferior-eval '(%graft? #f)
inferior) inferior)
(inferior-eval '(define channel-instance (inferior-eval '(define channel-instance
(@@ (guix channels) channel-instance)) (@@ (guix channels) channel-instance))