From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mathieu Lirzin Subject: Re: Is it possible add 'Guix package manager without "make install"' to guix doc? Date: Sat, 30 May 2015 15:53:53 +0200 Message-ID: <878uc6p3wu.fsf@openmailbox.org> References: <87k2w1tq0y.fsf@163.com> <87h9r438er.fsf@earlgrey.lan> <87egm8h8w7.fsf@gnu.org> <87egm83019.fsf@earlgrey.lan> <87zj4ve6nm.fsf@gnu.org> <878ucf2ma7.fsf@earlgrey.lan> <87oal5dcmq.fsf@gnu.org> <87y4k921s2.fsf@openmailbox.org> <87a8wnayml.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47132) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YyhDm-0000V7-Mr for guix-devel@gnu.org; Sat, 30 May 2015 09:54:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YyhDj-0006Qa-FP for guix-devel@gnu.org; Sat, 30 May 2015 09:54:42 -0400 Received: from smtp19.openmailbox.org ([62.4.1.53]:40558) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YyhDj-0006Po-3x for guix-devel@gnu.org; Sat, 30 May 2015 09:54:39 -0400 In-Reply-To: <87a8wnayml.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Fri, 29 May 2015 22:59:30 +0200") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: guix , Feng Shu --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable ludo@gnu.org (Ludovic Court=C3=A8s) writes: > Mathieu Lirzin skribis: >> >> This statement should definitely complement the documentation in HACKING. > > Where/how would you suggest adding it? When reacting, I didn't realize that most of your statement is actually documented in the recent "Running Guix Before It Is Installed" node in doc/guix.texi. Nevertheless, I find it not really relevant to give hacking information in chapter 'Installation'. The attached patch tries to give a better consistency in the location of these useful informations. Even if I find this patch appropriate ;-), my personnal preference would be to delete HACKING, and move all its informations in the chapter 'Contributing' of the Holy Bible (with appropriate refinement of course!) and refer to it in README. Opinions about this? -- Mathieu Lirzin --=-=-= Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename=0001-doc-Move-hacker-tricks-to-HACKING.patch Content-Transfer-Encoding: quoted-printable >From 887f2640da75d93560f49edca6198d294d809a41 Mon Sep 17 00:00:00 2001 From: Mathieu Lirzin Date: Sat, 30 May 2015 01:47:21 +0200 Subject: [PATCH] doc: Move hacker tricks to 'HACKING'. * doc/guix.texi (Running Guix before it is installed): Delete node. (Packaging Guidelines): Adapt to it. * HACKING (Running Guix before it is installed): Delete section. (Doing Stuff!): New section. (Building from Git, Doing Stuff!, The Perfect Setup): Split informations. --- HACKING | 33 +++++++++++++++++++++++++++++---- doc/guix.texi | 43 +------------------------------------------ 2 files changed, 30 insertions(+), 46 deletions(-) diff --git a/HACKING b/HACKING index cf10ba5..e5f854b 100644 --- a/HACKING +++ b/HACKING @@ -4,6 +4,7 @@ =20 Copyright =C2=A9 2012, 2013, 2014, 2015 Ludovic Court=C3=A8s Copyright =C2=A9 2013 Nikita Karetnikov +Copyright =C2=A9 2015 Mathieu Lirzin Copyright =C2=A9 2014 Pierre-Antoine Rault =20 Copying and distribution of this file, with or without modification, @@ -13,8 +14,10 @@ Copyright =C2=A9 2014 Pierre-Antoine Rault =20 * Building from Git =20 -When building Guix from a checkout, the following packages are required in -addition to those mentioned in the installation instructions: +If you want to hack Guix itself, it is recommended to use the latest versi= on +from the Git repository. When building Guix from a checkout, the following +packages are required in addition to those mentioned in the installation +instructions: =20 - [[http://www.gnu.org/software/autoconf/][GNU Autoconf]] - [[http://www.gnu.org/software/automake/][GNU Automake]] @@ -44,9 +47,26 @@ Finally, you have to invoke =E2=80=98make check=E2=80=99= to run tests. If anything fails, take a look at =E2=80=9Cinfo '(guix) Installation'=E2=80=9D or send a mess= age to . =20 -* Running Guix before it is installed +* Doing stuff! =20 -See the same-named section in the manual. +In order to keep a sane working environment, you will find it useful to te= st +the changes made in your local source tree checkout without actually +installing them. So that you can distinguish between your =E2=80=9Cend-us= er=E2=80=9D hat and +your =E2=80=9Cmotley=E2=80=9D costume. + +To that end, all the command-line tools can be used even if you have not r= un +"make install". To do that, prefix each command with =3D./pre-inst-env=3D= (this +script lives in the top build tree of Guix), as in: + + $ sudo ./pre-inst-env guix-daemon --build-users-group=3Dguixbuild + $ ./pre-inst-env guix build hello + +Similarly, for a Guile session using the Guix modules: + + $ ./pre-inst-env guile -c '(use-modules (guix utils)) (pk (%current-syst= em))' + +The =3Dpre-inst-env=3D script sets up all the environment variables necess= ary to +support this, including =E2=80=98PATH=E2=80=99 and =E2=80=98GUILE_LOAD_PAT= H=E2=80=99. =20 * The Perfect Setup =20 @@ -59,6 +79,11 @@ Geiser allows for interactive and incremental developmen= t from within Emacs: code compilation and evaluation from within buffers, access to on-line documentation (docstrings), context-sensitive completion, M-. to jump to an object definition, a REPL to try out your code, and more. +For convenient Guix development, make sure to augment Guile=E2=80=99s load= path +so that it finds source files from your checkout: + + ;; Assuming the Guix checkout is in ~/src/guix. + (add-to-list 'geiser-guile-load-path "~/src/guix") =20 To actually edit the code, Emacs already has a neat Scheme mode. But in addition to that, you must not miss [[http://www.emacswiki.org/emacs/ParEd= it][Paredit]]. It provides facilities to diff --git a/doc/guix.texi b/doc/guix.texi index 2d10ec9..6dbd76e 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -88,7 +88,6 @@ Installation * Running the Test Suite:: Testing Guix. * Setting Up the Daemon:: Preparing the build daemon's environment. * Invoking guix-daemon:: Running the build daemon. -* Running Guix Before It Is Installed:: Hacker tricks. =20 Setting Up the Daemon =20 @@ -253,7 +252,6 @@ instead, you want to install the complete GNU operating= system, * Running the Test Suite:: Testing Guix. * Setting Up the Daemon:: Preparing the build daemon's environment. * Invoking guix-daemon:: Running the build daemon. -* Running Guix Before It Is Installed:: Hacker tricks. @end menu =20 @node Binary Installation @@ -835,44 +833,6 @@ useful in exceptional circumstances, such as if you ne= ed to run several daemons on the same machine. @end table =20 -@node Running Guix Before It Is Installed -@section Running Guix Before It Is Installed - -If you are hacking Guix itself---which is a good idea!---you will find -it useful to test the changes made in your local source tree checkout -without actually installing them. - -To that end, all the command-line tools can be used even if you have not -run @command{make install}. To do that, prefix each command with -@command{./pre-inst-env} (the @file{pre-inst-env} script lives in the -top build tree of Guix), as in: - -@example -$ sudo ./pre-inst-env guix-daemon --build-users-group=3Dguixbuild -$ ./pre-inst-env guix build hello -@end example - -@noindent -Similarly, for a Guile session using the Guix modules: - -@example -$ ./pre-inst-env guile -c '(use-modules (guix utils)) (pk (%current-system= ))' -@end example - -The @command{pre-inst-env} script sets up all the environment variables -necessary to support this, including @code{PATH} and -@code{GUILE_LOAD_PATH}. - -If you are hacking Guix from Emacs using the wonderful Geiser -(@pxref{Introduction,,, geiser, Geiser User Manual}), make sure to -augment Guile's load path so that it finds source files from your -checkout: - -@lisp -;; Assuming the Guix checkout is in ~/src/guix. -(add-to-list 'geiser-guile-load-path "~/src/guix") -@end lisp - =20 @c ********************************************************************* @node Package Management @@ -6300,8 +6260,7 @@ creating packages. For more information on package d= efinitions, Once a package definition is in place, stored in a file in the Guix source tree, it can be tested using the @command{guix build} command (@pxref{Invoking guix build}). For example, assuming the new package is -called @code{gnew}, you may run this command from the Guix build tree -(@pxref{Running Guix Before It Is Installed}): +called @code{gnew}, you may run this command from the Guix build tree: =20 @example ./pre-inst-env guix build gnew --keep-failed --=20 2.1.4 --=-=-=--