From 68a61e9ffb4d1c8b54db68d61a3669bda50f1bd2 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sun, 17 Aug 2014 21:20:11 +0200 Subject: gexp: Add #:target parameter to 'gexp->derivation'. * guix/gexp.scm (lower-inputs): Add #:system and #:target. Use 'package->cross-derivation' when TARGET is true. Honor SYSTEM. (gexp->derivation): Add #:target argument. Pass SYSTEM and TARGET to 'lower-inputs' and 'gexp->sexp'. (gexp->sexp): Add #:system and #:target. Pass them in recursive call and to 'package-file'. * tests/gexp.scm (gexp->sexp*): Add 'system' and 'target' parameters. ("gexp->derivation, cross-compilation"): New test. --- doc/guix.texi | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/guix.texi b/doc/guix.texi index a7803a4aee..8381b388cc 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -2218,13 +2218,15 @@ below allow you to do that (@pxref{The Store Monad}, for more information about monads.) @deffn {Monadic Procedure} gexp->derivation @var{name} @var{exp} @ - [#:system (%current-system)] [#:inputs '()] @ + [#:system (%current-system)] [#:target #f] [#:inputs '()] @ [#:hash #f] [#:hash-algo #f] @ [#:recursive? #f] [#:env-vars '()] [#:modules '()] @ [#:references-graphs #f] [#:local-build? #f] @ [#:guile-for-build #f] Return a derivation @var{name} that runs @var{exp} (a gexp) with -@var{guile-for-build} (a derivation) on @var{system}. +@var{guile-for-build} (a derivation) on @var{system}. When @var{target} +is true, it is used as the cross-compilation target triplet for packages +referred to by @var{exp}. Make @var{modules} available in the evaluation context of @var{EXP}; @var{MODULES} is a list of names of Guile modules from the current -- cgit v1.2.3