From e855c7e2c9a9a5cbe4406c1f9351181a9ebe6283 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Sat, 14 Apr 2012 18:38:52 +0200 Subject: nix-channel improvements "nix-channel --add" now accepts a second argument: the channel name. This allows channels to have a nicer name than (say) nixpkgs_unstable. If no name is given, it defaults to the last component of the URL (with "-unstable" or "-stable" removed). Also, channels are now stored in a profile (/nix/var/nix/profiles/per-user/$USER/channels). One advantage of this is that it allows rollbacks (e.g. if "nix-channel --update" gives an undesirable update). --- doc/manual/nix-channel.xml | 48 +++++++++++++++++++++++++++++++--------------- doc/manual/nix-store.xml | 5 +++-- 2 files changed, 36 insertions(+), 17 deletions(-) (limited to 'doc') diff --git a/doc/manual/nix-channel.xml b/doc/manual/nix-channel.xml index 024add8601e8..22d8900d8f1c 100644 --- a/doc/manual/nix-channel.xml +++ b/doc/manual/nix-channel.xml @@ -19,7 +19,7 @@ nix-channel - url + url name url @@ -31,32 +31,39 @@ A Nix channel is mechanism that allows you to automatically stay up-to-date with a set of pre-built Nix expressions. A Nix channel is -just a URL that points to a place that contains a set of Nix -expressions, as well as a nix-push manifest. See -also . +just a URL that points to a place containing a set of Nix expressions +and a nix-push manifest. See also . This command has the following operations: - url + url [name] - Adds url to the list of - subscribed channels. + Adds a channel named + name with URL + url to the list of subscribed channels. + If name is omitted, it defaults to the + last component of url, with the + suffixes -stable or + -unstable removed. - url + name - Removes url from the - list of subscribed channels. + Removes the channel named + name from the list of subscribed + channels. - Prints the URLs of all subscribed channels on - standard output. + Prints the names and URLs of all subscribed + channels on standard output. @@ -64,7 +71,7 @@ also . Downloads the Nix expressions of all subscribed channels, makes them the default for nix-env - operations (by symlinking them in the directory + operations (by symlinking them from the directory ~/.nix-defexpr), and performs a nix-pull on the manifests of all channels to make pre-built binaries available. @@ -75,8 +82,8 @@ also . -Note that and -do not automatically perform an update. +Note that does not automatically perform +an update. The list of subscribed channels is stored in ~/.nix-channels. @@ -90,4 +97,15 @@ respectively. +Examples + +To subscribe to the Nixpkgs channel and install the GNU Hello package: + + +$ nix-channel --add http://nixos.org/releases/nixpkgs/channels/nixpkgs-unstable +$ nix-channel --update +$ nix-env -iA nixpkgs.hello + + + diff --git a/doc/manual/nix-store.xml b/doc/manual/nix-store.xml index 6a4ca3f717ff..6cc765bf27ca 100644 --- a/doc/manual/nix-store.xml +++ b/doc/manual/nix-store.xml @@ -58,8 +58,9 @@ options. Causes the result of a realisation ( and ) - to be registered as a root of the garbage collector (see ). The root is stored in + to be registered as a root of the garbage collector (see ). The root is stored in path, which must be inside a directory that is scanned for roots by the garbage collector (i.e., typically in a subdirectory of -- cgit 1.4.1