diff options
author | Ludovic Courtès <ludo@gnu.org> | 2015-08-29 00:32:31 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2015-08-29 01:22:54 +0200 |
commit | 0309e1b0ba9764746fc99c6ee02917c585ea8579 (patch) | |
tree | 97b972a38766535063468d8ac04001eac0ac0cb0 /guix | |
parent | b6c6105cacf8093bafcdbb73fad591070cfaa8d7 (diff) |
gexp: Add #:script-name parameter to 'gexp->derivation'.
* guix/gexp.scm (gexp->derivation): Add #:script-name parameter.
* doc/guix.texi (G-Expressions): Document it.
Diffstat (limited to 'guix')
-rw-r--r-- | guix/gexp.scm | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/guix/gexp.scm b/guix/gexp.scm index 6dc816dc40..63af40aed9 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 |