From c58273cd40a645f58fa4397049656095fae9c3fc Mon Sep 17 00:00:00 2001 From: Chris Marusich Date: Sun, 2 Oct 2016 13:00:34 -0700 Subject: [PATCH] gnu: Add "guix-for-environment" variable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This provides an obvious and easy way to use Guix to set up an environment for building Guix from a Git checkout. * gnu/packages/package-management.scm (guix-for-environment): Add it. Update all documentation to refer to the package named "guix" when talking about the release version, and the package named "guix-devel" when talking about the development version. Co-authored-by: Ludovic Courtès --- README | 3 ++- doc/contributing.texi | 4 ++-- doc/guix.texi | 2 +- gnu/packages/package-management.scm | 12 ++++++++++++ 4 files changed, 17 insertions(+), 4 deletions(-) diff --git a/README b/README index f05a4b5..d4484e8 100644 --- a/README +++ b/README @@ -54,7 +54,8 @@ For information on installation from a Git checkout, please see the section You can re-build and re-install Guix using a system that already runs Guix. To do so: - - Start a shell with the development environment for Guix: + - Start a shell with an environment containing the dependencies required to + build the release version of Guix: guix environment guix diff --git a/doc/contributing.texi b/doc/contributing.texi index 18d891d..50657de 100644 --- a/doc/contributing.texi +++ b/doc/contributing.texi @@ -50,14 +50,14 @@ all the dependencies and appropriate environment variables are set up to hack on Guix: @example -guix environment guix +guix environment guix-devel @end example @xref{Invoking guix environment}, for more information on that command. Extra dependencies can be added with @option{--ad-hoc}: @example -guix environment guix --ad-hoc help2man git strace +guix environment guix-devel --ad-hoc git strace @end example Run @command{./bootstrap} to generate the build system infrastructure diff --git a/doc/guix.texi b/doc/guix.texi index f5bbb92..e03b4a4 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -5609,7 +5609,7 @@ the following command creates a Guix development environment that additionally includes Git and strace: @example -guix environment guix --ad-hoc git strace +guix environment guix-devel --ad-hoc git strace @end example Sometimes it is desirable to isolate the environment as much as diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm index 4cc5b89..01221df 100644 --- a/gnu/packages/package-management.scm +++ b/gnu/packages/package-management.scm @@ -255,6 +255,18 @@ the Nix package manager.") (define-public guix guix-devel) +(define-public guix-for-environment + ;; We provide this pseudo-package just to allow people to run: + ;; guix environment guix-devel + ;; to reliably get the development environment for Guix (using 'guix' for + ;; this purpose does not work when 'guix' points to the built-from-tarball + ;; package rather than to the built-from-checkout package.) + (package + (inherit guix-devel) + (name "guix-devel") + (source #f) ;not meant to be built + (supported-systems '()))) + (define (source-file? file stat) "Return true if FILE is likely a source file, false if it is a typical generated file." -- 2.9.2