forked from lix-project/lix
Simplify quick start section
This commit is contained in:
parent
d23931f3a4
commit
e0a947cde6
1 changed files with 11 additions and 46 deletions
|
@ -11,56 +11,22 @@ to the following chapters.</para>
|
|||
|
||||
<orderedlist>
|
||||
|
||||
<listitem><para>Download a source tarball or RPM or Debian/Ubuntu
|
||||
package from <link xlink:href='http://nixos.org/'/>. Build source
|
||||
distributions using the regular sequence:
|
||||
<listitem><para>Install Nix by running the following:
|
||||
|
||||
<screen>
|
||||
$ tar xvfj nix-<replaceable>version</replaceable>.tar.bz2
|
||||
$ cd nix-<replaceable>version</replaceable>
|
||||
$ ./configure
|
||||
$ make
|
||||
$ make install <lineannotation>(as root)</lineannotation></screen>
|
||||
$ bash <(curl https://nixos.org/nix/install)
|
||||
</screen>
|
||||
|
||||
This will install the Nix binaries in <filename>/usr/local</filename>
|
||||
and keep the Nix store and other state in <filename>/nix</filename>.
|
||||
You can change the former by specifying
|
||||
<option>--prefix=<replaceable>path</replaceable></option>. The
|
||||
location of the store can be changed using
|
||||
<option>--with-store-dir=<replaceable>path</replaceable></option>.
|
||||
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>~/.profile</filename> (or some other login
|
||||
file).</para></listitem>
|
||||
|
||||
<listitem><para>Subscribe to the Nix Packages channel.
|
||||
|
||||
<screen>
|
||||
$ nix-channel --add http://nixos.org/channels/nixpkgs-unstable</screen>
|
||||
|
||||
</para></listitem>
|
||||
|
||||
<listitem><para>Download the latest Nix expressions available in the channel.
|
||||
<screen>
|
||||
$ nix-channel --update</screen>
|
||||
|
||||
Note that this in itself doesn't download any packages, it just
|
||||
downloads the Nix expressions that build them and stores them
|
||||
somewhere (under <filename>~/.nix-defexpr</filename>, in case you're
|
||||
curious). Also, it registers the fact that pre-built binaries are
|
||||
available remotely.</para></listitem>
|
||||
This will install Nix in <filename>/nix</filename>. The install script
|
||||
will create <filename>/nix</filename> using <command>sudo</command>,
|
||||
so make sure you have sufficient rights. (For other installation
|
||||
methods, see <xref linkend="chap-installation"/>.)</para></listitem>
|
||||
|
||||
<listitem><para>See what installable packages are currently available
|
||||
in the channel:
|
||||
|
||||
<screen>
|
||||
$ nix-env -qa \*
|
||||
$ nix-env -qa
|
||||
docbook-xml-4.2
|
||||
firefox-1.0pre-PR-0.10.1
|
||||
hello-2.1.1
|
||||
|
@ -72,7 +38,7 @@ libxslt-1.1.0
|
|||
<listitem><para>Install some packages from the channel:
|
||||
|
||||
<screen>
|
||||
$ nix-env -i hello firefox <replaceable>...</replaceable> </screen>
|
||||
$ nix-env -i hello <replaceable>...</replaceable> </screen>
|
||||
|
||||
This should download pre-built packages; it should not build them
|
||||
locally (if it does, something went wrong).</para></listitem>
|
||||
|
@ -84,8 +50,7 @@ $ which hello
|
|||
/home/eelco/.nix-profile/bin/hello
|
||||
$ hello
|
||||
Hello, world!
|
||||
$ firefox
|
||||
<lineannotation>(read Slashdot or something)</lineannotation></screen>
|
||||
</screen>
|
||||
|
||||
</para></listitem>
|
||||
|
||||
|
@ -99,7 +64,7 @@ $ nix-env -e hello</screen>
|
|||
<listitem><para>To keep up-to-date with the channel, do:
|
||||
|
||||
<screen>
|
||||
$ nix-channel --update
|
||||
$ nix-channel --update nixpkgs
|
||||
$ nix-env -u '*'</screen>
|
||||
|
||||
The latter command will upgrade each installed package for which there
|
||||
|
|
Loading…
Reference in a new issue