guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/03: gexp: Add #:script-name parameter to 'gexp->derivation'.


From: Ludovic Courtès
Subject: 02/03: gexp: Add #:script-name parameter to 'gexp->derivation'.
Date: Fri, 28 Aug 2015 23:24:31 +0000

civodul pushed a commit to branch master
in repository guix.

commit 0309e1b0ba9764746fc99c6ee02917c585ea8579
Author: Ludovic Courtès <address@hidden>
Date:   Sat Aug 29 00:32:31 2015 +0200

    gexp: Add #:script-name parameter to 'gexp->derivation'.
    
    * guix/gexp.scm (gexp->derivation): Add #:script-name parameter.
    * doc/guix.texi (G-Expressions): Document it.
---
 doc/guix.texi |    8 +++++---
 guix/gexp.scm |   10 ++++++----
 2 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 2973411..f69440c 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -3263,11 +3263,13 @@ information about monads.)
        [#:module-path @var{%load-path}] @
        [#:references-graphs #f] [#:allowed-references #f] @
        [#:leaked-env-vars #f] @
+       [#:script-name (string-append @var{name} "-builder")] @
        [#:local-build? #f] [#:substitutable? #t] [#:guile-for-build #f]
 Return a derivation @var{name} that runs @var{exp} (a gexp) with
address@hidden (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}.
address@hidden (a derivation) on @var{system}; @var{exp} is
+stored in a file called @var{script-name}.  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 searched in
diff --git a/guix/gexp.scm b/guix/gexp.scm
index 6dc816d..63af40a 100644
--- a/guix/gexp.scm
+++ b/guix/gexp.scm
@@ -331,10 +331,12 @@ names and file names suitable for the 
#:allowed-references argument to
                            references-graphs
                            allowed-references
                            leaked-env-vars
-                           local-build? (substitutable? #t))
+                           local-build? (substitutable? #t)
+                           (script-name (string-append name "-builder")))
   "Return a derivation NAME that runs EXP (a gexp) with GUILE-FOR-BUILD (a
-derivation) on SYSTEM.  When TARGET is true, it is used as the
-cross-compilation target triplet for packages referred to by EXP.
+derivation) on SYSTEM; EXP is stored in a file called SCRIPT-NAME.  When
+TARGET is true, it is used as the cross-compilation target triplet for
+packages referred to by EXP.
 
 Make MODULES available in the evaluation context of EXP; MODULES is a list of
 names of Guile modules searched in MODULE-PATH to be copied in the store,
@@ -397,7 +399,7 @@ The other arguments are as for 'derivation'."
                        (sexp     (gexp->sexp exp
                                              #:system system
                                              #:target target))
-                       (builder  (text-file (string-append name "-builder")
+                       (builder  (text-file script-name
                                             (object->string sexp)))
                        (modules  (if (pair? %modules)
                                      (imported-modules %modules



reply via email to

[Prev in Thread] Current Thread [Next in Thread]