summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-05-23 15:55:08 +0200
committerLudovic Courtès <ludo@gnu.org>2015-05-23 15:57:18 +0200
commitc71979f416df409425391e1de35ec95528ed0f84 (patch)
treea90215e0bdb0fcf62e74c58636c12b2ffd321680 /doc
parent92492b23838f77decfc63810b56add0af6805feb (diff)
doc: Add "Running Guix Before It Is Installed".
* doc/guix.texi (Running Guix Before It Is Installed): New node. (Packaging Guidelines): Refer to it.
Diffstat (limited to 'doc')
-rw-r--r--doc/guix.texi43
1 files changed, 42 insertions, 1 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index 1d882afeca8..cfb626c7057 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -88,6 +88,7 @@ Installation
88* Running the Test Suite:: Testing Guix. 88* Running the Test Suite:: Testing Guix.
89* Setting Up the Daemon:: Preparing the build daemon's environment. 89* Setting Up the Daemon:: Preparing the build daemon's environment.
90* Invoking guix-daemon:: Running the build daemon. 90* Invoking guix-daemon:: Running the build daemon.
91* Running Guix Before It Is Installed:: Hacker tricks.
91 92
92Setting Up the Daemon 93Setting Up the Daemon
93 94
@@ -252,6 +253,7 @@ instead, you want to install the complete GNU operating system,
252* Running the Test Suite:: Testing Guix. 253* Running the Test Suite:: Testing Guix.
253* Setting Up the Daemon:: Preparing the build daemon's environment. 254* Setting Up the Daemon:: Preparing the build daemon's environment.
254* Invoking guix-daemon:: Running the build daemon. 255* Invoking guix-daemon:: Running the build daemon.
256* Running Guix Before It Is Installed:: Hacker tricks.
255@end menu 257@end menu
256 258
257@node Binary Installation 259@node Binary Installation
@@ -830,6 +832,44 @@ useful in exceptional circumstances, such as if you need to run several
830daemons on the same machine. 832daemons on the same machine.
831@end table 833@end table
832 834
835@node Running Guix Before It Is Installed
836@section Running Guix Before It Is Installed
837
838If you are hacking Guix itself---which is a good idea!---you will find
839it useful to test the changes made in your local source tree checkout
840without actually installing them.
841
842To that end, all the command-line tools can be used even if you have not
843run @command{make install}. To do that, prefix each command with
844@command{./pre-inst-env} (the @file{pre-inst-env} script lives in the
845top build tree of Guix), as in:
846
847@example
848$ sudo ./pre-inst-env guix-daemon --build-users-group=guixbuild
849$ ./pre-inst-env guix build hello
850@end example
851
852@noindent
853Similarly, for a Guile session using the Guix modules:
854
855@example
856$ ./pre-inst-env guile -c '(use-modules (guix utils)) (pk (%current-system))'
857@end example
858
859The @command{pre-inst-env} script sets up all the environment variables
860necessary to support this, including @code{PATH} and
861@code{GUILE_LOAD_PATH}.
862
863If you are hacking Guix from Emacs using the wonderful Geiser
864(@pxref{Introduction,,, geiser, Geiser User Manual}), make sure to
865augment Guile's load path so that it finds source files from your
866checkout:
867
868@lisp
869;; Assuming the Guix checkout is in ~/src/guix.
870(add-to-list 'geiser-guile-load-path "~/src/guix")
871@end lisp
872
833 873
834@c ********************************************************************* 874@c *********************************************************************
835@node Package Management 875@node Package Management
@@ -6215,7 +6255,8 @@ creating packages. For more information on package definitions,
6215Once a package definition is in place, stored in a file in the Guix 6255Once a package definition is in place, stored in a file in the Guix
6216source tree, it can be tested using the @command{guix build} command 6256source tree, it can be tested using the @command{guix build} command
6217(@pxref{Invoking guix build}). For example, assuming the new package is 6257(@pxref{Invoking guix build}). For example, assuming the new package is
6218called @code{gnew}, you may run this command from the Guix build tree: 6258called @code{gnew}, you may run this command from the Guix build tree
6259(@pxref{Running Guix Before It Is Installed}):
6219 6260
6220@example 6261@example
6221./pre-inst-env guix build gnew --keep-failed 6262./pre-inst-env guix build gnew --keep-failed