aboutsummaryrefslogtreecommitdiff
path: root/guix/remote.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2019-07-09 23:05:01 +0200
committerLudovic Courtès <ludo@gnu.org>2019-07-15 10:01:05 +0200
commit386857748097619b3b75a7bf93677b6aa742d03c (patch)
tree1284c8d01514268d62a60cf9dc74464d7bdcb245 /guix/remote.scm
parent4daf89d619be788cf5a71867ad674cd5ff6e31fe (diff)
downloadguix-386857748097619b3b75a7bf93677b6aa742d03c.tar
guix-386857748097619b3b75a7bf93677b6aa742d03c.tar.gz
gexp: <lowered-gexp> separates sources from derivation inputs.
* guix/gexp.scm (lower-inputs): Return either <derivation-input> records or store items. (lower-reference-graphs): Return file/input pairs. (<lowered-gexp>)[sources]: New field. (lower-gexp): Adjust accordingly. (gexp->input-tuple): Remove. (gexp->derivation)[graphs-file-names]: Handle only the 'derivation-input?' and 'string?' cases. Pass #:sources to 'raw-derivation'; ensure #:inputs contains only <derivation-input> records. * guix/remote.scm (remote-eval): Adjust to the new <lowered-gexp> interface. * tests/gexp.scm ("lower-gexp"): Adjust to expect <derivation-input> records instead of <gexp-input>
Diffstat (limited to 'guix/remote.scm')
-rw-r--r--guix/remote.scm36
1 files changed, 11 insertions, 25 deletions
diff --git a/guix/remote.scm b/guix/remote.scm
index e503c76167..52ced16871 100644
--- a/guix/remote.scm
+++ b/guix/remote.scm
@@ -95,40 +95,26 @@ remote store."
(remote -> (connect-to-remote-daemon session
socket-name)))
(define inputs
- (cons (gexp-input (lowered-gexp-guile lowered))
+ (cons (derivation-input (lowered-gexp-guile lowered))
(lowered-gexp-inputs lowered)))
- (define to-build
- (map (lambda (input)
- (if (derivation? (gexp-input-thing input))
- (cons (gexp-input-thing input)
- (gexp-input-output input))
- (gexp-input-thing input)))
- inputs))
+ (define sources
+ (lowered-gexp-sources lowered))
(if build-locally?
- (let ((to-send (map (lambda (input)
- (match (gexp-input-thing input)
- ((? derivation? drv)
- (derivation->output-path
- drv (gexp-input-output input)))
- ((? store-path? item)
- item)))
- inputs)))
+ (let ((to-send (append (map derivation-input-output-paths inputs)
+ sources)))
(mbegin %store-monad
- (built-derivations to-build)
+ (built-derivations inputs)
((store-lift send-files) to-send remote #:recursive? #t)
(return (close-connection remote))
(return (%remote-eval lowered session))))
- (let ((to-send (map (lambda (input)
- (match (gexp-input-thing input)
- ((? derivation? drv)
- (derivation-file-name drv))
- ((? store-path? item)
- item)))
- inputs)))
+ (let ((to-send (append (map (compose derivation-file-name
+ derivation-input-derivation)
+ inputs)
+ sources)))
(mbegin %store-monad
((store-lift send-files) to-send remote #:recursive? #t)
- (return (build-derivations remote to-build))
+ (return (build-derivations remote inputs))
(return (close-connection remote))
(return (%remote-eval lowered session)))))))