[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

305/376: Update quick start section

From: Ludovic Courtès
Subject: 305/376: Update quick start section
Date: Wed, 28 Jan 2015 22:05:48 +0000

civodul pushed a commit to tag 1.8
in repository guix.

commit 103e4e43cc09df94348b08cfc4883dfa388d3d20
Author: Eelco Dolstra <address@hidden>
Date:   Mon Nov 24 15:14:07 2014 +0100

    Update quick start section
 doc/manual/introduction/about-nix.xml   |   70 +++++++++++++++++++++++--------
 doc/manual/introduction/quick-start.xml |   33 +++++++++++++--
 2 files changed, 81 insertions(+), 22 deletions(-)

diff --git a/doc/manual/introduction/about-nix.xml 
index 4860b3d..54c18a1 100644
--- a/doc/manual/introduction/about-nix.xml
+++ b/doc/manual/introduction/about-nix.xml
@@ -4,7 +4,7 @@
+<title>About Nix</title>
 <para>Nix is a <emphasis>purely functional package manager</emphasis>.
 This means that it treats packages like values in purely functional
@@ -16,10 +16,10 @@ store</emphasis>, usually the directory
 subdirectory such as
-where <literal>nlc4z5…</literal> is a unique identifier for the
+where <literal>b6gvzjyb2pg0…</literal> is a unique identifier for the
 package that captures all its dependencies (it’s a cryptographic hash
 of the package’s build dependency graph).  This enables many powerful
@@ -165,12 +165,6 @@ skip building from source and download a pre-built binary 
instead if
 it knows about it.  <emphasis>Nix channels</emphasis> provide Nix
 expressions along with pre-built binaries.</para>
-<para>source deployment model (like <a
-href="";>Gentoo</a>) and a binary model (like
@@ -193,10 +187,48 @@ collection</emphasis> (Nixpkgs).</para>
+<simplesect><title>Managing build environments</title>
+<para>Nix is extremely useful for developers as it makes it easy to
+automatically set up the the build environment for a package. Given a
+Nix expression that describes the dependencies of your package, the
+command <command>nix-shell</command> will build or download those
+dependencies if they’re not already in your Nix store, and then start
+a Bash shell in which all necessary environment variables (such as
+compiler search paths) are set.</para>
+<para>For example, the following command gets all dependencies of the
+Pan newsreader, as described by <link
+Nix expression</link>:</para>
+$ nix-shell '&lt;nixpkgs>' -A pan
+<para>You’re then dropped into a shell where you can edit, build and test
+the package:</para>
+[nix-shell]$ tar xf $src
+[nix-shell]$ cd pan-*
+[nix-shell]$ ./configure
+[nix-shell]$ make
+[nix-shell]$ ./pan/gui/pan
+<para>Since Nix packages are reproducible and have complete dependency
+specifications, Nix makes an excellent basis for <a
+href="[%root%]hydra">a continuous build system</a>.</para>
-<para>Nix should run on most Unix systems, including Linux and Mac OS
+<para>Nix runs on Linux and Mac OS X.</para>
@@ -206,20 +238,22 @@ X.</para>
 <para>NixOS is a Linux distribution based on Nix.  It uses Nix not
 just for package management but also to manage the system
 configuration (e.g., to build configuration files in
-<filename>/etc</filename>).  This means, among other things, that it’s
-possible to easily roll back the entire configuration of the system to
-an earlier state.  Also, users can install software without root
+<filename>/etc</filename>).  This means, among other things, that it
+is easy to roll back the entire configuration of the system to an
+earlier state.  Also, users can install software without root
 privileges.  For more information and downloads, see the <link
 xlink:href="";>NixOS homepage</link>.</para>
-<!-- other features:
-- build farms
-- reproducibility (Nix expressions allows whole configuration to be rebuilt)
+<para>Nix is released under the terms of the <link
+LGPLv2.1 or (at your option) any later version</link>.</para>
diff --git a/doc/manual/introduction/quick-start.xml 
index 396b7b1..0d13651 100644
--- a/doc/manual/introduction/quick-start.xml
+++ b/doc/manual/introduction/quick-start.xml
@@ -28,10 +28,11 @@ in the channel:
 $ nix-env -qa
@@ -62,6 +63,28 @@ $ nix-env -e hello</screen>
+<step><para>You can also test a package without installing it:
+$ nix-shell -p hello
+This builds or downloads GNU Hello and its dependencies, then drops
+you into a Bash shell where the <command>hello</command> command is
+present, all without affecting your normal environment:
+[nix-shell:~]$ hello
+Hello, world!
+[nix-shell:~]$ exit
+$ hello
+hello: command not found
 <step><para>To keep up-to-date with the channel, do:
@@ -72,6 +95,7 @@ The latter command will upgrade each installed package for 
which there
 is a “newer” version (as determined by comparing the version
 <step><para>You can also install specific packages directly from
 your web browser.  For instance, you can go to <link
@@ -81,6 +105,7 @@ the program <command>nix-install-package</command>.  A 
window should
 appear asking you whether it’s okay to install the package.  Say
 <literal>Y</literal>.  The package and all its dependencies will be
 <step><para>If you're unhappy with the result of a
 <command>nix-env</command> action (e.g., an upgraded package turned

reply via email to

[Prev in Thread] Current Thread [Next in Thread]