build-system: Use 'input-tuples->gexp' and 'outputs->gexp'.
* guix/gexp.scm (input-tuples->gexp, outputs->gexp): Make public. * guix/build-system/cargo.scm (cargo-build): Use them. * guix/build-system/gnu.scm (gnu-cross-build): Likewise. * guix/build-system/ocaml.scm (ocaml-build): Likewise. * guix/build-system/cmake.scm (cmake-cross-build): Likewise.
This commit is contained in:
parent
f95fc73248
commit
6cd591155c
5 changed files with 15 additions and 34 deletions
|
@ -114,13 +114,8 @@ (define builder
|
|||
#: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))))))
|
||||
|
|
|
@ -204,20 +204,14 @@ (define builder
|
|||
(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
|
||||
|
|
|
@ -510,20 +510,14 @@ (define builder
|
|||
(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
|
||||
|
|
|
@ -260,13 +260,8 @@ (define builder
|
|||
(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
|
||||
|
|
|
@ -106,6 +106,9 @@ (define-module (guix gexp)
|
|||
lowered-gexp-load-compiled-path
|
||||
|
||||
with-build-variables
|
||||
input-tuples->gexp
|
||||
outputs->gexp
|
||||
|
||||
gexp->derivation
|
||||
gexp->file
|
||||
gexp->script
|
||||
|
|
Loading…
Reference in a new issue