diff options
author | Konrad Hinsen <konrad.hinsen@fastmail.net> | 2020-05-14 11:18:43 +0200 |
---|---|---|
committer | Guix Patches Tester <> | 2020-05-14 10:20:13 +0100 |
commit | 9bc80dc8c11118927e1c7867c97f98551f827713 (patch) | |
tree | 6a4c2821f44795355c1b8a23639ac3433534001e /doc/guix.texi | |
parent | f6ec9f9d39eeab1eb5432272d47f87f70e95a890 (diff) | |
download | guix-patches-9bc80dc8c11118927e1c7867c97f98551f827713.tar guix-patches-9bc80dc8c11118927e1c7867c97f98551f827713.tar.gz |
guix: add script execution to "guix repl"
* guix/scripts/repl.scm: Add filename options for script execution.
* doc/guix.texi: Document script execution by "guix repl"
Diffstat (limited to 'doc/guix.texi')
-rw-r--r-- | doc/guix.texi | 38 |
1 files changed, 29 insertions, 9 deletions
diff --git a/doc/guix.texi b/doc/guix.texi index d6fbd85fde..68f1a8bba3 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -238,7 +238,7 @@ Programming Interface * Derivations:: Low-level interface to package derivations. * The Store Monad:: Purely functional interface to the store. * G-Expressions:: Manipulating build expressions. -* Invoking guix repl:: Fiddling with Guix interactively. +* Invoking guix repl:: Programming Guix in Guile Defining Packages @@ -5415,7 +5415,7 @@ package definitions. * Derivations:: Low-level interface to package derivations. * The Store Monad:: Purely functional interface to the store. * G-Expressions:: Manipulating build expressions. -* Invoking guix repl:: Fiddling with Guix interactively. +* Invoking guix repl:: Programming Guix in Guile @end menu @node Package Modules @@ -8134,12 +8134,31 @@ has an associated gexp compiler, such as a @code{<package>}. @node Invoking guix repl @section Invoking @command{guix repl} -@cindex REPL, read-eval-print loop -The @command{guix repl} command spawns a Guile @dfn{read-eval-print loop} -(REPL) for interactive programming (@pxref{Using Guile Interactively,,, guile, -GNU Guile Reference Manual}). Compared to just launching the @command{guile} +@cindex REPL, read-eval-print loop, script +The @command{guix repl} command makes it easier to program Guix in Guile +by launching a Guile @dfn{read-eval-print loop} (REPL) for interactive +programming (@pxref{Using Guile Interactively,,, guile, +GNU Guile Reference Manual}), or by running Guile scripts +(@pxref{Running Guile Scripts,,, guile, +GNU Guile Reference Manual}). +Compared to just launching the @command{guile} command, @command{guix repl} guarantees that all the Guix modules and all its -dependencies are available in the search path. You can use it this way: +dependencies are available in the search path. + +The general syntax is: + +@example +guix repl @var{options} @var{files} +@end example + +When at least one @var{files} argument is provided, @var{files} are +executed as Guile scripts in the given order: + +@example +$ guix repl my-script.scm +@end example + +Otherwise a Guile REPL is started: @example $ guix repl @@ -8188,11 +8207,12 @@ Add @var{directory} to the front of the package module search path (@pxref{Package Modules}). This allows users to define their own packages and make them visible to -the command-line tool. +the scripts or REPL. @item -q Inhibit loading of the @file{~/.guile} file. By default, that -configuration file is loaded when spawning a @code{guile} REPL. +configuration file is loaded when executing scripts or spawning +a @code{guile} REPL. @end table @c ********************************************************************* |