Quick Start
This chapter is for impatient people who don't like reading
documentation. For more in-depth information you are kindly
referred to and .
Download a source tarball or RPM from .
Build source distributions using the regular sequence:
$ tar xvfj nix-version.tar.bz2
$ ./configure
$ make
$ make install (as root)
This will install Nix in /nix. You
should also add /nix/etc/profile.d/nix.sh
to your ~/.bashrc (or some other login
file).
Get some Nix expressions for pre-built packages by downloading
the latest nixpkgs distribution (from the
same location), and unpack them.
$ wget http://.../nix/nixpkgs-version/nixpkgs-version.tar.bz2
$ tar xfj nixpkgs-version.tar.bz2
This will unpack the distribution into a directory
nixpkgs-version/.
Pull the Nix cache. This ensures that when you install
packages they are downloaded in pre-built form from the
network, rather than built from source.
$ nix-pull http://.../nix/nixpkgs-version/MANIFEST
Note that currently we only pre-build for Linux on x86
platforms.
See what's available:
$ nix-env -qaf nixpkgs-version/
MozillaFirebird-0.7
hello-2.1.1
docbook-xml-4.2
libxslt-1.1.0
...
Install some packages:
$ nix-env -iBf nixpkgs-version/ hello MozillaFirebird ...
Test that they work:
$ which hello
/home/eelco/.nix-profile/bin/hello
$ hello
Hello, world!
$ MozillaFirebird
(read Slashdot or something)
Uninstall a package:
$ nix-env -e hello
If a new release of nixpkgs comes along,
you can upgrade all installed packages to the latest versions
by downloading and unpacking the new release and doing:
$ nix-env -uBf nixpkgs-version/ '*'
You should periodically run the Nix garbage collector to get
rid of unused packages, since uninstalls or upgrades don't
actual delete them:
$ nix-collect-garbage | xargs nix-store --delete