* Various updates.

This commit is contained in:
Eelco Dolstra 2009-11-05 09:07:43 +00:00
parent 1ff8758f76
commit 268d90a03e
6 changed files with 63 additions and 143 deletions

View file

@ -140,16 +140,25 @@ $ ./bootstrap</screen>
<para>The installation path can be specified by passing the <para>The installation path can be specified by passing the
<option>--prefix=<replaceable>prefix</replaceable></option> to <option>--prefix=<replaceable>prefix</replaceable></option> to
<command>configure</command>. The default installation directory is <command>configure</command>. The default installation directory is
<filename>/nix</filename>. You can change this to any location you <filename>/usr/local</filename>. You can change this to any location
like. You must have write permission to the you like. You must have write permission to the
<replaceable>prefix</replaceable> path.</para> <replaceable>prefix</replaceable> path.</para>
<warning><para>It is best <emphasis>not</emphasis> to change the <para>Nix keeps its <emphasis>store</emphasis> (the place where
installation prefix from its default, since doing so makes it packages are stored) in <filename>/nix/store</filename> by default.
impossible to use pre-built binaries from the standard Nixpkgs This can be changed using
channels.</para></warning> <option>--with-store-dir=<replaceable>path</replaceable></option>.</para>
<para>If you want to rebuilt the documentation, pass the full path to <warning><para>It is best <emphasis>not</emphasis> to change the Nix
store from its default, since doing so makes it impossible to use
pre-built binaries from the standard Nixpkgs channels — that is, all
packages will need to be built from source.</para></warning>
<para>Nix keeps state (such as its database and log files) in
<filename>/nix/var</filename> by default. This can be changed using
<option>--localstatedir=<replaceable>path</replaceable></option>.</para>
<para>If you want to rebuild the documentation, pass the full path to
the DocBook RELAX NG schemas and to the DocBook XSL stylesheets using the DocBook RELAX NG schemas and to the DocBook XSL stylesheets using
the the
<option>--with-docbook-rng=<replaceable>path</replaceable></option> <option>--with-docbook-rng=<replaceable>path</replaceable></option>
@ -160,27 +169,26 @@ options.</para>
</section> </section>
<section><title>Installing from RPMs</title> <section><title>Installing a binary distribution</title>
<para>RPM packages of Nix can be downloaded from <link <para>RPM and Deb packages of Nix for a number of different versions
xlink:href="http://nixos.org/" />. These RPMs should work for most of Fedora, openSUSE, Debian and Ubuntu can be downloaded from <link
fairly recent releases of SuSE and Red Hat Linux. They have been xlink:href="http://nixos.org/" />. Once downloaded, the RPMs can be
known to work work on SuSE Linux 8.1 and 9.0, and Red Hat 9.0. In installed or upgraded using <command>rpm -U</command>. For example,
fact, it should work on any RPM-based Linux distribution based on
<literal>glibc</literal> 2.3 or later.</para>
<para>Once downloaded, the RPMs can be installed or upgraded using
<command>rpm -U</command>. For example,
<screen> <screen>
$ rpm -U nix-0.5pre664-1.i386.rpm</screen> $ rpm -U nix-0.13pre18104-1.i386.rpm</screen>
Likewise, for a Deb package:
<screen>
$ dpkg -i nix_0.13pre18104-1_amd64.deb</screen>
</para> </para>
<para>The RPMs install into the directory <filename>/nix</filename>. <para>Nix can be uninstalled using <command>rpm -e nix</command> or
Nix can be uninstalled using <command>rpm -e nix</command>. After <command>dpkg -r nix</command>. After this you should manually remove
this it will be necessary to manually remove the Nix store and other the Nix store and other auxiliary data, if desired:
auxiliary data:
<screen> <screen>
$ rm -rf /nix/store $ rm -rf /nix/store
@ -191,6 +199,7 @@ $ rm -rf /nix/var</screen>
</section> </section>
<!-- TODO: should be updated
<section><title>Upgrading Nix through Nix</title> <section><title>Upgrading Nix through Nix</title>
<para>You can install the latest stable version of Nix through Nix <para>You can install the latest stable version of Nix through Nix
@ -203,6 +212,7 @@ installation</link> by clicking on the package links at <link
xlink:href="http://nixos.org/releases/full-index-nix.html" />.</para> xlink:href="http://nixos.org/releases/full-index-nix.html" />.</para>
</section> </section>
-->
<section><title>Security</title> <section><title>Security</title>

View file

@ -320,7 +320,7 @@ overview of NixOS is given in the HotOS XI paper <citetitle
xlink:href="http://www.st.ewi.tudelft.nl/~dolstra/pubs/hotos-final.pdf">Purely xlink:href="http://www.st.ewi.tudelft.nl/~dolstra/pubs/hotos-final.pdf">Purely
Functional System Configuration Management</citetitle>. The Nix Functional System Configuration Management</citetitle>. The Nix
homepage has <link homepage has <link
xlink:href="http://nix.cs.uu.nl/docs/papers.html">an up-to-date list xlink:href="http://nixos.org/docs/papers.html">an up-to-date list
of Nix-related papers</link>.</para> of Nix-related papers</link>.</para>
<para>Nix is the subject of Eelco Dolstras PhD thesis <citetitle <para>Nix is the subject of Eelco Dolstras PhD thesis <citetitle

View file

@ -179,99 +179,4 @@
</sect1> </sect1>
<sect1>
<title>Semantics</title>
<sect2>
<title>Built-in functions</title>
<para>
The Nix language provides the following built-in function
(<quote>primops</quote>):
</para>
<variablelist>
<varlistentry>
<term><function>import</function>
<replaceable>e</replaceable></term>
<listitem>
<para>
Evaluates the expression <replaceable>e</replaceable>,
which must yield a path value. The Nix expression
stored at this path in the file system is then read,
parsed, and evaluated. Returns the result of the
evaluation of the Nix expression just read.
</para>
<para>
Example: <literal>import ./foo.nix</literal> evaluates
the expression stored in <filename>foo.nix</filename>
(in the directory containing the expression in which the
<function>import</function> occurs).
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><function>derivation</function>
<replaceable>e</replaceable></term>
<listitem>
<para>
Evaluates the expression <replaceable>e</replaceable>,
which must yield an attribute set. [...]
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><function>baseNameOf</function>
<replaceable>e</replaceable></term>
<listitem>
<para>
Evaluates the expression <replaceable>e</replaceable>,
which must yield a string value, and returns a string
representing its <emphasis>base name</emphasis>. This
is the substring following the last path separator
(<literal>/</literal>).
</para>
<para>
Example: <literal>baseNameOf "/foo/bar"</literal>
returns <literal>"bar"</literal>, and
<literal>baseNameOf "/foo/bar/"</literal> returns
<literal>""</literal>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><function>toString</function>
<replaceable>e</replaceable></term>
<listitem>
<para>
Evaluates the expression <replaceable>e</replaceable>
and coerces it into a string, if possible. Only
strings, paths, and URIs can be so coerced.
</para>
<para>
Example: <literal>toString
http://www.cs.uu.nl/</literal> returns
<literal>"http://www.cs.uu.nl/"</literal>.
</para>
</listitem>
</varlistentry>
</variablelist>
</sect2>
</sect1>
</appendix> </appendix>

View file

@ -507,19 +507,16 @@ click on it, and it will be installed with all the necessary
dependencies.</para> dependencies.</para>
<para>For instance, you can go to <link <para>For instance, you can go to <link
xlink:href="http://nixos.org/releases/nixpkgs/nixpkgs-unstable/" /> — xlink:href="http://hydra.nixos.org/jobset/nixpkgs/trunk/channel/latest"
or to any older release of Nix Packages — and click on any link for /> and click on any link for the individual packages for your
the individual packages for your platform (say, <link platform. The first time you do this, your browser will ask what to
xlink:href='http://nix.cs.uu.nl/dist/nix/nixpkgs-0.10pre6622/pkgs/subversion-1.4.0-i686-linux.nixpkg'><literal>subversion-1.4.0</literal> do with <literal>application/nix-package</literal> files. You should
for <literal>i686-linux</literal></link>). The first time you do open them with <filename>/nix/bin/nix-install-package</filename>.
this, your browser will ask what to do with This will open a window that asks you to confirm that you want to
<literal>application/nix-package</literal> files. You should open install the package. When you answer <literal>Y</literal>, the
them with <filename>/nix/bin/nix-install-package</filename>. This package and all its dependencies will be installed. This is a binary
will open a window that asks you to confirm that you want to install deployment mechanism — you get packages pre-compiled for the selected
the package. When you answer <literal>Y</literal>, the package and platform type.</para>
all its dependencies will be installed. This is a binary deployment
mechanism — you get packages pre-compiled for the selected platform
type.</para>
<para>You can also install <literal>application/nix-package</literal> <para>You can also install <literal>application/nix-package</literal>
files from the command line directly. See <xref files from the command line directly. See <xref

View file

@ -11,9 +11,9 @@ to the following chapters.</para>
<orderedlist> <orderedlist>
<listitem><para>Download a source tarball or RPM from <link <listitem><para>Download a source tarball, RPM or Deb from <link
xlink:href='http://nixos.org/'/>. Build source xlink:href='http://nixos.org/'/>. Build source distributions using
distributions using the regular sequence: the regular sequence:
<screen> <screen>
$ tar xvfj nix-<replaceable>version</replaceable>.tar.bz2 $ tar xvfj nix-<replaceable>version</replaceable>.tar.bz2
@ -21,13 +21,21 @@ $ ./configure
$ make $ make
$ make install <lineannotation>(as root)</lineannotation></screen> $ make install <lineannotation>(as root)</lineannotation></screen>
This will install Nix in <filename>/nix</filename>. You shouldn't This will install the Nix binaries in <filename>/usr/local</filename>
change the prefix if at all possible since that will make it and keep the Nix store and other state in <filename>/nix</filename>.
impossible to use pre-built binaries from the Nixpkgs channel and You can change the former by specifying
other channels. Alternatively, you could grab an RPM if you're on an <option>--prefix=<replaceable>path</replaceable></option>. The
RPM-based system. You should also add location of the store can be changed using
<filename>/nix/etc/profile.d/nix.sh</filename> to your <option>--with-store-dir=<replaceable>path</replaceable></option>.
<filename>~/.bashrc</filename> (or some other login However, you shouldn't change the store location, if at all possible,
since that will make it impossible to use pre-built binaries from the
Nixpkgs channel and other channels. The location of the state can be
changed using
<option>--localstatedir=<replaceable>path</replaceable>.</option></para></listitem>
<listitem><para>You should add
<filename><replaceable>prefix</replaceable>/etc/profile.d/nix.sh</filename>
to your <filename>~/.bashrc</filename> (or some other login
file).</para></listitem> file).</para></listitem>
<listitem><para>Subscribe to the Nix Packages channel. <listitem><para>Subscribe to the Nix Packages channel.
@ -100,7 +108,7 @@ numbers).</para></listitem>
<listitem><para>You can also install specific packages directly from <listitem><para>You can also install specific packages directly from
your web browser. For instance, you can go to <link your web browser. For instance, you can go to <link
xlink:href="http://nix.cs.uu.nl/dist/nix/nixpkgs-unstable-latest/" /> xlink:href="http://hydra.nixos.org/jobset/nixpkgs/trunk/channel/latest" />
and click on any link for the individual packages for your platform. and click on any link for the individual packages for your platform.
Associate <literal>application/nix-package</literal> with the program Associate <literal>application/nix-package</literal> with the program
<filename>/nix/bin/nix-install-package</filename>. A window should <filename>/nix/bin/nix-install-package</filename>. A window should

View file

@ -8,7 +8,7 @@
<!--==================================================================--> <!--==================================================================-->
<section xml:id="ssec-relnotes-0.13"><title>Release 0.13 (November 4, <section xml:id="ssec-relnotes-0.13"><title>Release 0.13 (November 5,
2009)</title> 2009)</title>
<para>This is primarily a bug fix release. It has some new <para>This is primarily a bug fix release. It has some new