build-system/scons: Use 'with-build-variables'.

This brings back the '%build-inputs' and '%outputs' global variables,
which some packages such as 'serf' expect.

* guix/build-system/scons.scm (scons-build): Use 'with-build-variables'.
This commit is contained in:
Ludovic Courtès 2021-03-31 14:06:17 +02:00
parent 8886a96f74
commit b702d1219c
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -97,7 +97,8 @@ provides a 'SConstruct' file as its build system."
#~(begin #~(begin
(use-modules #$@(sexp->gexp modules)) (use-modules #$@(sexp->gexp modules))
(scons-build #:name #$name #$(with-build-variables inputs outputs
#~(scons-build #:name #$name
#:source #+source #:source #+source
#:scons-flags #$(sexp->gexp scons-flags) #:scons-flags #$(sexp->gexp scons-flags)
#:system #$system #:system #$system
@ -108,16 +109,12 @@ provides a 'SConstruct' file as its build system."
#:phases #$(if (pair? phases) #:phases #$(if (pair? phases)
(sexp->gexp phases) (sexp->gexp phases)
phases) phases)
#:outputs (list #$@(map (lambda (name) #:outputs %outputs
#~(cons #$name #:inputs %build-inputs
(ungexp output name))) #:search-paths
outputs)) '#$(sexp->gexp
#:inputs (map (lambda (tuple)
(apply cons tuple))
'#$inputs)
#:search-paths '#$(sexp->gexp
(map search-path-specification->sexp (map search-path-specification->sexp
search-paths)))))) search-paths)))))))
(gexp->derivation name builder (gexp->derivation name builder
#:system system #:system system