From 8baf50f10821e6def3006af8ff8b8739c66b028a Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 20 Jan 2004 11:49:32 +0000 Subject: [PATCH] * Manual updates. * Updated the README. Now it just refers to the manual. --- README | 39 ++-------------- doc/manual/installation.xml | 91 +++++++++++++++++++++++++++++-------- doc/manual/introduction.xml | 8 ---- doc/manual/overview.xml | 60 +++++++++++++++++++----- 4 files changed, 124 insertions(+), 74 deletions(-) diff --git a/README b/README index d3d9d603e..344cfddb0 100644 --- a/README +++ b/README @@ -1,36 +1,5 @@ -Overview -======== + *** Nix *** -Nix is a package manager, deployment system, and component glue -mechanism. - - -Prerequisites -============= - -* Berkeley DB 4.0.14 -* CWI ATerm 2.0 - - -Installation -============ - -* When building from the Subversion repository, first do: - - autoreconf -i - -* To build, do: - - ./configure - make - make install - - Note that this will install to /nix, which is the default prefix. - You can specify another prefix, but this is not recommended if you - want to use prebuilt packages from other sources. - - -Usage -===== - -TODO \ No newline at end of file +For installation and usage instructions, please read the manual, which +can be found in docs/manual/manual.html, and additionally at the Nix +website at . diff --git a/doc/manual/installation.xml b/doc/manual/installation.xml index a9a30b09d..ebc4f168a 100644 --- a/doc/manual/installation.xml +++ b/doc/manual/installation.xml @@ -6,8 +6,9 @@ The easiest way to obtain Nix is to download a source - distribution. + url='http://www.cs.uu.nl/groups/ST/Trace/Nix'>source + distribution. RPMs for SuSE and Red Hat are also + available. These distributions are generated automatically. @@ -35,8 +36,13 @@ $ svn checkout https://svn.cs.uu.nl:12443/repos/trace/nix/trunk nix Prerequisites - A fairly recent version of GCC/G++ is required. Version 2.95 and higher - should work. + The following prerequisites only apply when you build from + source. Binary releases (e.g., RPMs) have no prerequisites. + + + + A fairly recent version of GCC/G++ is required. Version 2.95 + and higher should work. @@ -63,7 +69,7 @@ $ svn checkout https://svn.cs.uu.nl:12443/repos/trace/nix/trunk nix - Building Nix + Building Nix from source After unpacking or checking out the Nix sources, issue the following @@ -112,20 +118,71 @@ $ autoreconf -i + + Installing from RPMs + + + RPM packages of Nix can be downloaded from . These RPMs + should work for most fairly recent releases of SuSE and Red Hat + Linux. They have been known to work work on SuSE Linux 8.1 and + 9.0, and Red Hat 9.0. In fact, it should work on any RPM-based + Linux distribution based on glibc 2.3 or + later. + + + + Once downloaded, the RPMs can be installed or upgraded using + rpm -U. For example, + + + +rpm -U nix-0.5pre664-1.i386.rpm + + + The RPMs install into the directory /nix. + Nix can be uninstalled using rpm -e nix. + After this it will be necessary to manually remove the Nix store + and other auxiliary data: + + + +rm -rf /nix/store +rm -rf /nix/var + + + + + Permissions + + + All Nix operations must be performed under the user ID that owns + the Nix store and database + (prefix/store + and + prefix/var/nix/db, + respectively). When installed from the RPM packages, these + directories are owned by root. + + + + Using Nix - To use Nix, some environment variables should be set. In particular, - PATH should contain the directories + To use Nix, some environment variables should be set. In + particular, PATH should contain the directories prefix/bin and - prefix/var/nix/links/current/bin. - The first directory contains the Nix tools themselves, while the second - contains to the current user environment (an - automatically generated package consisting of symlinks to installed - packages). The simplest way to set the required environment variables is - to include the file - prefix/etc/profile.d/nix.sh + ~/.nix-userenv/bin. The first directory + contains the Nix tools themselves, while + ~/.nix-userenv is a symbolic link to the + current user environment (an automatically + generated package consisting of symlinks to installed packages). + The simplest way to set the required environment variables is to + include the file + prefix/etc/profile.d/nix.sh in your ~/.bashrc (or similar), like this: @@ -135,9 +192,3 @@ $ autoreconf -i - - diff --git a/doc/manual/introduction.xml b/doc/manual/introduction.xml index b41cad0a8..02a438336 100644 --- a/doc/manual/introduction.xml +++ b/doc/manual/introduction.xml @@ -91,11 +91,3 @@ - - - - diff --git a/doc/manual/overview.xml b/doc/manual/overview.xml index 85f164587..9925be994 100644 --- a/doc/manual/overview.xml +++ b/doc/manual/overview.xml @@ -5,6 +5,10 @@ This chapter provides a guided tour of Nix. + + + + Basic package management @@ -63,7 +67,7 @@ pan-0.14.2 -$ nix-env -qf pkgs/system/i686-linux.nix +$ nix-env -qaf pkgs/system/i686-linux.nix gettext-0.12.1 sylpheed-0.9.7 aterm-2.0 @@ -86,7 +90,7 @@ pan-0.14.2 -$ nix-env -qsf pkgs/system/i686-linux.nix +$ nix-env -qasf pkgs/system/i686-linux.nix -P gettext-0.12.1 IP sylpheed-0.9.7 -- aterm-2.0 @@ -111,7 +115,7 @@ IP sylpheed-0.9.7 -$ nix-env -i pkgs/system/i686-linux.nix pan-0.14.2 +$ nix-env -if pkgs/system/i686-linux.nix pan Since installation may take a long time, depending on whether any @@ -234,11 +238,52 @@ lrwxrwxrwx 1 eelco ... svn -> /nix/store/3829...fb5d-subversion-0.32.1/bin/svn -$ nix-env -u pan-0.14.2 +$ nix-env -e pan + + + This means that the package is removed from the user + environment. It is not yet removed from + the system. When a package is uninstalled from a user + environment, it may still be used by other packages, or may + still be present in other user environments. Deleting it under + such conditions would break those other packages or user + environments. To prevent this, packages are only + physically deleted by running the Nix garbage + collector, which searches for all packages in the Nix store that + are no longer reachable from outside the store. + Thus, uninstalling a package is always safe: it cannot break + other packages. + + + + Upgrading packages is easy. Given a Nix expression that + contains newer versions of installed packages (that is, packages + with the same package name, but a higher version number), + nix-env -u will replace the installed package + in the user environment with the newer package. For example, + + +$ nix-env -uf pkgs/system/i686-linux.nix pan + + looks for a newer version of Pan, and installs it if found. + Also useful is the ability to upgrade all + packages: + + +$ nix-env -uf pkgs/system/i686-linux.nix '*' + + The asterisk matches all installed packagesNo, + we don't support arbitrary regular + expressions. Note that * + must be quoted to prevent shell globbing. + + + + Writing Nix expressions @@ -400,11 +445,4 @@ derivation { - - -