From 371c57d8a7c0ee58de82f68c9dfb116cee7e00a9 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 13 Oct 2004 15:35:47 +0000 Subject: * Updated the quick start section. Use channels instead of downloading Nix expressions and calling nix-pull. This is so user-friendly that even a Mac user can do it! :-) --- doc/manual/quick-start.xml | 188 ++++++++++++++++++++------------------------- 1 file changed, 83 insertions(+), 105 deletions(-) (limited to 'doc/manual') diff --git a/doc/manual/quick-start.xml b/doc/manual/quick-start.xml index badbfa29461c..a6ec25514eb3 100644 --- a/doc/manual/quick-start.xml +++ b/doc/manual/quick-start.xml @@ -1,141 +1,119 @@ - - 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: +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: +This will install Nix in /nix. You shouldn't +change the prefix if at all possible since that will make it +impossible to use our pre-built components. Alternatively, you could +grab an RPM if you're on an RPM-based system. You should also add +/nix/etc/profile.d/nix.sh to your +~/.bashrc (or some other login +file). - -$ nix-env -qaf nixpkgs-version/ -MozillaFirebird-0.7 -hello-2.1.1 +Subscribe to the Nix Packages channel. + + +$ nix-channel --add http://catamaran.labs.cs.uu.nl/dist/nix/channels/nixpkgs-unstable + + + +Download the latest Nix expressions available in the channel. + +$ nix-channel --update + +Note that this in itself doesn't download any components, it just +downloads the Nix expressions that build them and stores them +somewhere (under ~/.nix-defexpr, in case you're +curious). Also, it registers the fact that pre-built binaries are +available remotely. + +See what installable components are currently +available in the channel: + + +$ nix-env -qa docbook-xml-4.2 +firefox-1.0pre-PR-0.10.1 +hello-2.1.1 libxslt-1.1.0 ... - - + - - - Install some packages: +Install some components from the channel: - -$ nix-env -iBf nixpkgs-version/ hello MozillaFirebird ... + +$ nix-env -i hello firefox ... - - +This should download the pre-built components; it should not build +them locally (if it does, something went wrong). - - - Test that they work: +Test that they work: - + $ which hello /home/eelco/.nix-profile/bin/hello $ hello Hello, world! -$ MozillaFirebird +$ firefox (read Slashdot or something) - - + - - - Uninstall a package: +Uninstall a package: - + $ nix-env -e hello - - + + +To keep up-to-date with the channel, do: + + +$ nix-channel --update +$ nix-env -u '*' + +The latter command will upgrade each installed component for which +there is a newer version (as determined by comparing +the version numbers). - - - 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: +If you're unhappy with the result of a +nix-env action (e.g., an upgraded component turned +out not to work properly), you can go back: - -$ nix-env -uBf nixpkgs-version/ '*' + +$ nix-env --rollback - - + - - - You should periodically run the Nix garbage collector to get - rid of unused packages, since uninstalls or upgrades don't - actual delete them: +You should periodically run the Nix garbage collector +to get rid of unused packages, since uninstalls or upgrades don't +actual delete them: - + +$ nix-env --delete-generations old $ nix-collect-garbage - - +The first command deletes old generations of your +profile (making rollbacks impossible, but also making the components +in those old generations available for garbage collection), while the +second command actually deletes them. - + \ No newline at end of file -- cgit 1.4.1