summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--guix/build-system/cargo.scm9
-rw-r--r--guix/build-system/cmake.scm14
-rw-r--r--guix/build-system/gnu.scm14
-rw-r--r--guix/build-system/ocaml.scm9
-rw-r--r--guix/gexp.scm3
5 files changed, 15 insertions, 34 deletions
diff --git a/guix/build-system/cargo.scm b/guix/build-system/cargo.scm
index 0af0ce0233..60c35eed07 100644
--- a/guix/build-system/cargo.scm
+++ b/guix/build-system/cargo.scm
@@ -114,13 +114,8 @@ to NAME and VERSION."
#:phases #$(if (pair? phases)
(sexp->gexp phases)
phases)
- #:outputs (list #$@(map (lambda (name)
- #~(cons #$name
- (ungexp output name)))
- outputs))
- #:inputs (map (lambda (tuple)
- (apply cons tuple))
- '#$inputs)
+ #:outputs #$(outputs->gexp outputs)
+ #:inputs #$(input-tuples->gexp inputs)
#:search-paths '#$(sexp->gexp
(map search-path-specification->sexp
search-paths))))))
diff --git a/guix/build-system/cmake.scm b/guix/build-system/cmake.scm
index 80059217c2..2f9689b07c 100644
--- a/guix/build-system/cmake.scm
+++ b/guix/build-system/cmake.scm
@@ -204,20 +204,14 @@ build system."
(use-modules #$@(sexp->gexp modules))
(define %build-host-inputs
- (map (lambda (tuple)
- (apply cons tuple))
- '#+(append build-inputs target-inputs)))
+ #+(input-tuples->gexp build-inputs))
(define %build-target-inputs
- (map (lambda (tuple)
- (apply cons tuple))
- '#$host-inputs))
+ (append #$(input-tuples->gexp host-inputs)
+ #+(input-tuples->gexp target-inputs)))
(define %outputs
- (list #$@(map (lambda (name)
- #~(cons #$name
- (ungexp output name)))
- outputs)))
+ #$(outputs->gexp outputs))
(cmake-build #:source #+source
#:system #$system
diff --git a/guix/build-system/gnu.scm b/guix/build-system/gnu.scm
index 3fb1a241dd..a1b2b654aa 100644
--- a/guix/build-system/gnu.scm
+++ b/guix/build-system/gnu.scm
@@ -510,20 +510,14 @@ platform."
(use-modules #$@(sexp->gexp modules))
(define %build-host-inputs
- (map (lambda (tuple)
- (apply cons tuple))
- '#+build-inputs))
+ #+(input-tuples->gexp build-inputs))
(define %build-target-inputs
- (map (lambda (tuple)
- (apply cons tuple))
- (append '#$host-inputs '#+target-inputs)))
+ (append #$(input-tuples->gexp host-inputs)
+ #+(input-tuples->gexp target-inputs)))
(define %outputs
- (list #$@(map (lambda (name)
- #~(cons #$name
- (ungexp output name)))
- outputs)))
+ #$(outputs->gexp outputs))
(gnu-build #:source #+source
#:system #$system
diff --git a/guix/build-system/ocaml.scm b/guix/build-system/ocaml.scm
index 2f60f0d534..e7d6d96f0e 100644
--- a/guix/build-system/ocaml.scm
+++ b/guix/build-system/ocaml.scm
@@ -260,13 +260,8 @@ provides a 'setup.ml' file as its build system."
(use-modules #$@modules)
(ocaml-build #:source #$source
#:system #$system
- #:outputs (list #$@(map (lambda (name)
- #~(cons #$name
- (ungexp output name)))
- outputs))
- #:inputs (map (lambda (tuple)
- (apply cons tuple))
- '#$inputs)
+ #:outputs #$(outputs->gexp outputs)
+ #:inputs #$(input-tuples->gexp inputs)
#:search-paths '#$(map search-path-specification->sexp
search-paths)
#:phases #$phases
diff --git a/guix/gexp.scm b/guix/gexp.scm
index 526a21fdd7..edd1224aa9 100644
--- a/guix/gexp.scm
+++ b/guix/gexp.scm
@@ -106,6 +106,9 @@
lowered-gexp-load-compiled-path
with-build-variables
+ input-tuples->gexp
+ outputs->gexp
+
gexp->derivation
gexp->file
gexp->script