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:
parent
8a48960fa7
commit
1a21bc40a8
1 changed files with 39 additions and 39 deletions
|
|
@ -920,52 +920,52 @@ 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 ()
|
||||||
|
((channel-instances->manifest instances #:system system) store))
|
||||||
|
(lambda (key . args)
|
||||||
|
(simple-format
|
||||||
|
(current-error-port)
|
||||||
|
"error: while computing manifest entry derivation for ~A\n"
|
||||||
|
system)
|
||||||
|
(simple-format
|
||||||
|
(current-error-port)
|
||||||
|
"error ~A: ~A\n" key args)
|
||||||
|
#f))))
|
||||||
|
(define (add-tmp-root-and-return-drv drv)
|
||||||
|
(add-temp-root store drv)
|
||||||
|
drv)
|
||||||
|
|
||||||
|
`(,system
|
||||||
|
.
|
||||||
|
((manifest-entry-item
|
||||||
|
. ,(and manifest
|
||||||
|
(add-tmp-root-and-return-drv
|
||||||
|
(derivation-file-name
|
||||||
|
(manifest-entry-item
|
||||||
|
(first
|
||||||
|
(manifest-entries manifest)))))))
|
||||||
|
(profile
|
||||||
|
. ,(catch #t
|
||||||
(lambda ()
|
(lambda ()
|
||||||
((channel-instances->manifest instances) store))
|
(and manifest
|
||||||
|
(add-tmp-root-and-return-drv
|
||||||
|
(derivation-file-name
|
||||||
|
(parameterize ((%current-system system))
|
||||||
|
(run-with-store store
|
||||||
|
(profile-derivation
|
||||||
|
manifest
|
||||||
|
#:hooks %channel-profile-hooks)))))))
|
||||||
(lambda (key . args)
|
(lambda (key . args)
|
||||||
(simple-format
|
(simple-format
|
||||||
(current-error-port)
|
(current-error-port)
|
||||||
"error: while computing manifest entry derivation for ~A\n"
|
"error: while computing profile derivation for ~A\n"
|
||||||
system)
|
system)
|
||||||
(simple-format
|
(simple-format
|
||||||
(current-error-port)
|
(current-error-port)
|
||||||
"error ~A: ~A\n" key args)
|
"error ~A: ~A\n" key args)
|
||||||
#f))))
|
#f)))))))
|
||||||
(define (add-tmp-root-and-return-drv drv)
|
|
||||||
(add-temp-root store drv)
|
|
||||||
drv)
|
|
||||||
|
|
||||||
`(,system
|
|
||||||
.
|
|
||||||
((manifest-entry-item
|
|
||||||
. ,(and manifest
|
|
||||||
(add-tmp-root-and-return-drv
|
|
||||||
(derivation-file-name
|
|
||||||
(manifest-entry-item
|
|
||||||
(first
|
|
||||||
(manifest-entries manifest)))))))
|
|
||||||
(profile
|
|
||||||
. ,(catch #t
|
|
||||||
(lambda ()
|
|
||||||
(and manifest
|
|
||||||
(add-tmp-root-and-return-drv
|
|
||||||
(derivation-file-name
|
|
||||||
(run-with-store store
|
|
||||||
(profile-derivation
|
|
||||||
manifest
|
|
||||||
#:hooks %channel-profile-hooks))))))
|
|
||||||
(lambda (key . args)
|
|
||||||
(simple-format
|
|
||||||
(current-error-port)
|
|
||||||
"error: while computing profile derivation for ~A\n"
|
|
||||||
system)
|
|
||||||
(simple-format
|
|
||||||
(current-error-port)
|
|
||||||
"error ~A: ~A\n" key args)
|
|
||||||
#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))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue