Refactor channel->derivation-file-name to reduce line length
This commit is contained in:
parent
3ee481110e
commit
9c38115c3d
1 changed files with 52 additions and 49 deletions
|
|
@ -719,26 +719,7 @@ WHERE job_id = $1"
|
|||
'open-inferior/container
|
||||
(resolve-module '(guix inferior))))
|
||||
|
||||
(let ((inferior
|
||||
(if use-container?
|
||||
(open-inferior/container
|
||||
store
|
||||
(guix-store-path store)
|
||||
#:extra-shared-directories
|
||||
'("/gnu/store")
|
||||
#:extra-environment-variables
|
||||
(list (string-append
|
||||
"SSL_CERT_DIR=" (nss-certs-store-path store))))
|
||||
(begin
|
||||
(simple-format #t "debug: using open-inferior\n")
|
||||
(open-inferior (guix-store-path store)
|
||||
#:error-port (real-error-port))))))
|
||||
|
||||
(catch
|
||||
#t
|
||||
(lambda ()
|
||||
(with-throw-handler #t
|
||||
(lambda ()
|
||||
(define (start-inferior-and-return-derivation-file-names)
|
||||
;; /etc is only missing if open-inferior/container has been used
|
||||
(when use-container?
|
||||
(inferior-eval
|
||||
|
|
@ -779,7 +760,8 @@ WHERE job_id = $1"
|
|||
,(channel-instance-commit channel-instance)
|
||||
,(channel-instance-checkout channel-instance)))))
|
||||
(run-with-store store
|
||||
(mlet* %store-monad ((manifest (channel-instances->manifest instances))
|
||||
(mlet* %store-monad ((manifest (channel-instances->manifest
|
||||
instances))
|
||||
(derv (profile-derivation manifest)))
|
||||
(mbegin %store-monad
|
||||
(return (derivation-file-name derv))))))))))
|
||||
|
|
@ -787,6 +769,27 @@ WHERE job_id = $1"
|
|||
(close-inferior inferior)
|
||||
|
||||
file-name)))
|
||||
|
||||
(let ((inferior
|
||||
(if use-container?
|
||||
(open-inferior/container
|
||||
store
|
||||
(guix-store-path store)
|
||||
#:extra-shared-directories
|
||||
'("/gnu/store")
|
||||
#:extra-environment-variables
|
||||
(list (string-append
|
||||
"SSL_CERT_DIR=" (nss-certs-store-path store))))
|
||||
(begin
|
||||
(simple-format #t "debug: using open-inferior\n")
|
||||
(open-inferior (guix-store-path store)
|
||||
#:error-port (real-error-port))))))
|
||||
|
||||
(catch
|
||||
#t
|
||||
(lambda ()
|
||||
(with-throw-handler #t
|
||||
start-inferior-and-return-derivation-file-names
|
||||
(lambda (key . parameters)
|
||||
(display (backtrace) (current-error-port))
|
||||
(display "\n" (current-error-port))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue