aboutsummaryrefslogtreecommitdiff
path: root/guix/build-system
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2013-09-26 21:50:05 +0200
committerLudovic Courtès <ludo@gnu.org>2013-09-27 00:46:17 +0200
commit03761a446536dc690010522ab522a1541766abd7 (patch)
treefd5b04a4ed2b0857cfabc9dd08e1d0fc9a00cff0 /guix/build-system
parent59c5c4dee1f95e26f018ba4f88666f7cdf824ff6 (diff)
downloadgnu-guix-03761a446536dc690010522ab522a1541766abd7.tar
gnu-guix-03761a446536dc690010522ab522a1541766abd7.tar.gz
build-system/trivial: Take the 'source' field into account.
* guix/build-system/trivial.scm (trivial-build): When SOURCE is true, add it to INPUTS. (trivial-cross-build): Likewise. * tests/packages.scm ("trivial with source"): New test.
Diffstat (limited to 'guix/build-system')
-rw-r--r--guix/build-system/trivial.scm10
1 files changed, 8 insertions, 2 deletions
diff --git a/guix/build-system/trivial.scm b/guix/build-system/trivial.scm
index 3c5031c4bd..f91997d1e9 100644
--- a/guix/build-system/trivial.scm
+++ b/guix/build-system/trivial.scm
@@ -42,7 +42,10 @@
search-paths)
"Run build expression BUILDER, an expression, for SYSTEM. SOURCE is
ignored."
- (build-expression->derivation store name system builder inputs
+ (build-expression->derivation store name system builder
+ (if source
+ `(("source" ,source) ,@inputs)
+ inputs)
#:outputs outputs
#:modules modules
#:guile-for-build
@@ -54,7 +57,10 @@ ignored."
search-paths native-search-paths)
"Like `trivial-build', but in a cross-compilation context."
(build-expression->derivation store name system builder
- (append native-inputs inputs)
+ (let ((inputs (append native-inputs inputs)))
+ (if source
+ `(("source" ,source) ,@inputs)
+ inputs))
#:outputs outputs
#:modules modules
#:guile-for-build