aboutsummaryrefslogtreecommitdiff
path: root/guix-data-service
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2020-02-09 16:43:37 +0000
committerChristopher Baines <mail@cbaines.net>2020-02-09 16:44:18 +0000
commitbeab4babac39fe6f579e09fdc4670d9a74e30074 (patch)
treeab264021ad37c0e6f65eecfeec4725b40a1fdbab /guix-data-service
parent9c38115c3d4eb34b21a7f3f0be1cddfa62616858 (diff)
downloaddata-service-beab4babac39fe6f579e09fdc4670d9a74e30074.tar
data-service-beab4babac39fe6f579e09fdc4670d9a74e30074.tar.gz
Further refactor channel->derivation-file-name
To reduce the line length.
Diffstat (limited to 'guix-data-service')
-rw-r--r--guix-data-service/jobs/load-new-guix-revision.scm39
1 files changed, 21 insertions, 18 deletions
diff --git a/guix-data-service/jobs/load-new-guix-revision.scm b/guix-data-service/jobs/load-new-guix-revision.scm
index 752e92c..6f57366 100644
--- a/guix-data-service/jobs/load-new-guix-revision.scm
+++ b/guix-data-service/jobs/load-new-guix-revision.scm
@@ -719,6 +719,24 @@ WHERE job_id = $1"
'open-inferior/container
(resolve-module '(guix inferior))))
+ (define inferior-code
+ `(lambda (store)
+ (let ((instances
+ (list
+ (channel-instance
+ (channel (name ',(channel-name channel))
+ (url ,(channel-url channel))
+ (branch ,(channel-branch channel))
+ (commit ,(channel-commit channel)))
+ ,(channel-instance-commit channel-instance)
+ ,(channel-instance-checkout channel-instance)))))
+ (run-with-store store
+ (mlet* %store-monad ((manifest (channel-instances->manifest
+ instances))
+ (derv (profile-derivation manifest)))
+ (mbegin %store-monad
+ (return (derivation-file-name derv))))))))
+
(define (start-inferior-and-return-derivation-file-names)
;; /etc is only missing if open-inferior/container has been used
(when use-container?
@@ -745,30 +763,15 @@ WHERE job_id = $1"
(@@ (guix channels) channel-instance))
inferior)
- (let ((file-name
+ (let ((result
(inferior-eval-with-store
inferior
store
- `(lambda (store)
- (let ((instances
- (list
- (channel-instance
- (channel (name ',(channel-name channel))
- (url ,(channel-url channel))
- (branch ,(channel-branch channel))
- (commit ,(channel-commit channel)))
- ,(channel-instance-commit channel-instance)
- ,(channel-instance-checkout channel-instance)))))
- (run-with-store store
- (mlet* %store-monad ((manifest (channel-instances->manifest
- instances))
- (derv (profile-derivation manifest)))
- (mbegin %store-monad
- (return (derivation-file-name derv))))))))))
+ inferior-code)))
(close-inferior inferior)
- file-name)))
+ result)))
(let ((inferior
(if use-container?