mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 07:26:13 -05:00
guix system: Use 'mbegin' for 'install'.
* guix/scripts/system.scm (install): Use 'mbegin'. Lift FORMAT and POPULATE-ROOT-FILE-SYSTEM, and use the result.
This commit is contained in:
parent
f4c4513d47
commit
cc7fa5929c
1 changed files with 13 additions and 9 deletions
|
@ -151,18 +151,22 @@ (define (maybe-copy to-copy)
|
|||
;; Copy items to the new store.
|
||||
(copy-closure to-copy target #:log-port log-port)))))
|
||||
|
||||
(mlet* %store-monad ((os-dir -> (derivation->output-path os-drv))
|
||||
(% (maybe-copy os-dir)))
|
||||
(let ((os-dir (derivation->output-path os-drv))
|
||||
(format (lift %store-monad format))
|
||||
(populate (lift2 %store-monad populate-root-file-system)))
|
||||
|
||||
;; Create a bunch of additional files.
|
||||
(format log-port "populating '~a'...~%" target)
|
||||
(populate-root-file-system os-dir target)
|
||||
(mbegin %store-monad
|
||||
(maybe-copy os-dir)
|
||||
|
||||
(when grub?
|
||||
(unless (false-if-exception (install-grub grub.cfg device target))
|
||||
(leave (_ "failed to install GRUB on device '~a'~%") device)))
|
||||
;; Create a bunch of additional files.
|
||||
(format log-port "populating '~a'...~%" target)
|
||||
(populate os-dir target)
|
||||
|
||||
(return #t)))
|
||||
(begin
|
||||
(when grub?
|
||||
(unless (false-if-exception (install-grub grub.cfg device target))
|
||||
(leave (_ "failed to install GRUB on device '~a'~%") device)))
|
||||
(return #t)))))
|
||||
|
||||
|
||||
;;;
|
||||
|
|
Loading…
Reference in a new issue