From 0b79a1208228298d3abda7c03153c1abec2406d4 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Sun, 14 Nov 2004 00:24:57 +0000 Subject: * Manual fixes. --- doc/manual/package-management.xml | 57 ++++++++++++++++++++------------------- 1 file changed, 29 insertions(+), 28 deletions(-) (limited to 'doc/manual/package-management.xml') diff --git a/doc/manual/package-management.xml b/doc/manual/package-management.xml index d299bf054e62..4e86b26010d3 100644 --- a/doc/manual/package-management.xml +++ b/doc/manual/package-management.xml @@ -31,7 +31,7 @@ Nix expressions called the Nix Package collection that contains components ranging from basic development stuff such as GCC and Glibc, to end-user applications like Mozilla Firefox. (Nix is however not tied to the Nix Package collection; you could write your own Nix -expression based on that, or completely new.) You can download the +expression based on it, or completely new ones.) You can download the latest version from . You probably want the latest unstable release; currently the stable releases tend to lag @@ -55,7 +55,7 @@ where nixpkgs-version is where you've unpacked the release. It is also possible to see the status of -available component, i.e., whether they are installed into the user +available components, i.e., whether they are installed into the user environment and/or present in the system: @@ -69,12 +69,13 @@ IPS bison-1.875d The first character (I) indicates whether the component is installed in your current user environment. The second (P) indicates whether it is present on your system -(in which case installing it into your user environment would be very -quick). The last one (S) indicates whether there -is a so-called substitute for the component, -which is Nix's mechanism for doing binary deployment. It just means -that Nix know that it can fetch a pre-built component from somewhere -(typically a network server) instead of building it locally. +(in which case installing it into your user environment would be a +very quick operation). The last one (S) indicates +whether there is a so-called substitute for the +component, which is Nix's mechanism for doing binary deployment. It +just means that Nix know that it can fetch a pre-built component from +somewhere (typically a network server) instead of building it +locally. So now that we have a set of Nix expressions we can build the components contained in them. This is done using nix-env @@ -91,8 +92,8 @@ system). When you do this for the first time, Nix will start building Subversion and all its dependencies. This will take quite a while — typically an hour or two on modern machines. Fortunately, there is a -faster way (so just do a Ctrl-C on that install operation!): you just -need to tell Nix that pre-built binaries of all those components are +faster way (so do a Ctrl-C on that install operation!): you just need +to tell Nix that pre-built binaries of all those components are available somewhere. This is done using the nix-pull command, which must be supplied with a URL containing a manifest describing what binaries @@ -110,7 +111,7 @@ downloading binaries from catamaran.labs.cs.uu.nl, instead of building them from source. This might still take a while since all dependencies must be downloaded, but on a reasonably fast connection -such as an ADSL line it's on the order of a few minutes. +such as an DSL line it's on the order of a few minutes. Naturally, packages can also be uninstalled: @@ -127,10 +128,10 @@ $ nix-env -f nixpkgs-version -u subversion This will only upgrade Subversion if there is a newer version in the new set of Nix expressions, as -defined by some pretty much arbitrary rules regarding ordering of -version numbers (which generally do what you'd expect of them). To -just unconditionally replace Subversion with whatever version is in -the Nix expressions, use -i instead of +defined by some pretty arbitrary rules regarding ordering of version +numbers (which generally do what you'd expect of them). To just +unconditionally replace Subversion with whatever version is in the Nix +expressions, use -i instead of -u; -i will remove whatever version is already installed. @@ -261,7 +262,7 @@ lrwxrwxrwx 1 eelco ... default-43-link -> /nix/store/84c85f89ddbf...-user-env lrwxrwxrwx 1 eelco ... default -> default-43-link This shows a profile called default. The file -default itself is actually a symlink that point +default itself is actually a symlink that points to the current generation. When we do a nix-env operation, a new user environment and generation link are created based on the current one, and finally the default @@ -295,13 +296,13 @@ $ nix-env --list-generations figure above. You generally wouldn't have /nix/var/nix/profiles/some-profile/bin in your PATH. Rather, there is a symlink -~/.nix-profile that point to your current +~/.nix-profile that points to your current profile. This means that you should put ~/.nix-profile/bin in your PATH (and indeed, that's what the initialisation script /nix/etc/profile.d/nix.sh does). This makes it -easier to switch to a different profile, which is exactly what the -command nix-env --switch-profile does: +easier to switch to a different profile. You can do that using the +command nix-env --switch-profile: $ nix-env --switch-profile /nix/var/nix/profiles/my-profile @@ -311,14 +312,14 @@ $ nix-env --switch-profile /nix/var/nix/profiles/default These commands switch to the my-profile and default profile, respectively. If the profile doesn't exist, it will be created automatically. You should be careful about storing a -profile in another location that the profiles -directory, since otherwise it might not be used as a root to the -garbage collection (see section profiles +directory, since otherwise it might not be used as a root of the +garbage collector (see section ). All nix-env operations work on the profile pointed to by ~/.nix-profile, but you can override -this on using the option (abbreviation +this using the option (abbreviation ): @@ -335,7 +336,7 @@ This will not change the nix-env operations such as upgrades () and uninstall () never actually delete components from the system. All they do (as shown -above) is to make a new user environment that no longer contains +above) is to create a new user environment that no longer contains symlinks to the deleted components. Of course, since disk space is not infinite, unused components @@ -414,10 +415,10 @@ a set of Nix expressions and a manifest. Using the command with whatever is available at that URL. You can subscribe to a channel using -nix-channel --subscribe, e.g., +nix-channel --add, e.g., -$ nix-channel --subscribe http://catamaran.labs.cs.uu.nl/dist/nix/channels/nixpkgs-unstable +$ nix-channel --add http://catamaran.labs.cs.uu.nl/dist/nix/channels/nixpkgs-unstable subscribes you to a channel that always contains that latest version of the Nix Packages collection. (Instead of @@ -446,9 +447,9 @@ makes the union of each channel's Nix expressions the default for $ nix-env -u '*' to upgrade all components in your profile to the latest versions -available in the channels. +available in the subscribed channels. - \ No newline at end of file + -- cgit 1.4.1