2006-08-21 16:05:11 +00:00
|
|
|
<refentry xmlns="http://docbook.org/ns/docbook"
|
2007-09-19 14:01:41 +00:00
|
|
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
2009-07-14 14:58:12 +00:00
|
|
|
xmlns:xi="http://www.w3.org/2001/XInclude"
|
|
|
|
xml:id="sec-nix-channel">
|
2005-04-09 17:16:00 +00:00
|
|
|
|
2007-09-19 14:01:41 +00:00
|
|
|
<refmeta>
|
|
|
|
<refentrytitle>nix-channel</refentrytitle>
|
|
|
|
<manvolnum>1</manvolnum>
|
|
|
|
<refmiscinfo class="source">Nix</refmiscinfo>
|
|
|
|
<refmiscinfo class="version"><xi:include href="version.txt" parse="text"/></refmiscinfo>
|
|
|
|
</refmeta>
|
|
|
|
|
2005-04-09 17:16:00 +00:00
|
|
|
<refnamediv>
|
|
|
|
<refname>nix-channel</refname>
|
|
|
|
<refpurpose>manage Nix channels</refpurpose>
|
|
|
|
</refnamediv>
|
|
|
|
|
|
|
|
<refsynopsisdiv>
|
|
|
|
<cmdsynopsis>
|
|
|
|
<command>nix-channel</command>
|
|
|
|
<group choice='req'>
|
2012-04-14 16:38:52 +00:00
|
|
|
<arg choice='plain'><option>--add</option> <replaceable>url</replaceable> <arg choice='opt'><replaceable>name</replaceable></arg></arg>
|
2005-04-09 17:16:00 +00:00
|
|
|
<arg choice='plain'><option>--remove</option> <replaceable>url</replaceable></arg>
|
|
|
|
<arg choice='plain'><option>--list</option></arg>
|
2012-05-07 21:55:56 +00:00
|
|
|
<arg choice='plain'><option>--update</option> <arg rep='repeat'><replaceable>names</replaceable></arg></arg>
|
2005-04-09 17:16:00 +00:00
|
|
|
</group>
|
|
|
|
</cmdsynopsis>
|
|
|
|
</refsynopsisdiv>
|
|
|
|
|
|
|
|
<refsection><title>Description</title>
|
|
|
|
|
|
|
|
<para>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
|
2012-04-14 16:38:52 +00:00
|
|
|
just a URL that points to a place containing a set of Nix expressions
|
|
|
|
and a <command>nix-push</command> manifest. <phrase
|
|
|
|
condition="manual">See also <xref linkend="sec-channels"
|
|
|
|
/>.</phrase></para>
|
2005-04-09 17:16:00 +00:00
|
|
|
|
|
|
|
<para>This command has the following operations:
|
|
|
|
|
|
|
|
<variablelist>
|
|
|
|
|
2012-04-14 16:38:52 +00:00
|
|
|
<varlistentry><term><option>--add</option> <replaceable>url</replaceable> [<replaceable>name</replaceable>]</term>
|
2005-04-09 17:16:00 +00:00
|
|
|
|
2012-04-14 16:38:52 +00:00
|
|
|
<listitem><para>Adds a channel named
|
|
|
|
<replaceable>name</replaceable> with URL
|
|
|
|
<replaceable>url</replaceable> to the list of subscribed channels.
|
|
|
|
If <replaceable>name</replaceable> is omitted, it defaults to the
|
|
|
|
last component of <replaceable>url</replaceable>, with the
|
|
|
|
suffixes <literal>-stable</literal> or
|
|
|
|
<literal>-unstable</literal> removed.</para></listitem>
|
2005-04-09 17:16:00 +00:00
|
|
|
|
|
|
|
</varlistentry>
|
|
|
|
|
2012-04-14 16:38:52 +00:00
|
|
|
<varlistentry><term><option>--remove</option> <replaceable>name</replaceable></term>
|
2005-04-09 17:16:00 +00:00
|
|
|
|
2012-04-14 16:38:52 +00:00
|
|
|
<listitem><para>Removes the channel named
|
|
|
|
<replaceable>name</replaceable> from the list of subscribed
|
|
|
|
channels.</para></listitem>
|
2005-04-09 17:16:00 +00:00
|
|
|
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
<varlistentry><term><option>--list</option></term>
|
|
|
|
|
2012-04-14 16:38:52 +00:00
|
|
|
<listitem><para>Prints the names and URLs of all subscribed
|
|
|
|
channels on standard output.</para></listitem>
|
2005-04-09 17:16:00 +00:00
|
|
|
|
|
|
|
</varlistentry>
|
|
|
|
|
2012-05-07 21:55:56 +00:00
|
|
|
<varlistentry><term><option>--update</option> [<replaceable>names</replaceable>…]</term>
|
2005-04-09 17:16:00 +00:00
|
|
|
|
|
|
|
<listitem><para>Downloads the Nix expressions of all subscribed
|
2012-05-07 21:55:56 +00:00
|
|
|
channels (or only those included in
|
|
|
|
<replaceable>names</replaceable> if specified), makes them the
|
|
|
|
default for <command>nix-env</command> operations (by symlinking
|
|
|
|
them from the directory <filename>~/.nix-defexpr</filename>), and
|
|
|
|
performs a <command>nix-pull</command> on the manifests of all
|
|
|
|
channels to make pre-built binaries available.</para></listitem>
|
2005-04-09 17:16:00 +00:00
|
|
|
|
|
|
|
</varlistentry>
|
|
|
|
|
|
|
|
</variablelist>
|
|
|
|
|
|
|
|
</para>
|
|
|
|
|
2012-04-14 16:38:52 +00:00
|
|
|
<para>Note that <option>--add</option> does not automatically perform
|
|
|
|
an update.</para>
|
2005-04-09 17:16:00 +00:00
|
|
|
|
|
|
|
<para>The list of subscribed channels is stored in
|
|
|
|
<filename>~/.nix-channels</filename>.</para>
|
|
|
|
|
|
|
|
<para>A channel consists of two elements: a bzipped Tar archive
|
|
|
|
containing the Nix expressions, and a manifest created by
|
|
|
|
<command>nix-push</command>. These must be stored under
|
|
|
|
<literal><replaceable>url</replaceable>/nixexprs.tar.bz2</literal> and
|
|
|
|
<literal><replaceable>url</replaceable>/MANIFEST</literal>,
|
|
|
|
respectively.</para>
|
|
|
|
|
|
|
|
</refsection>
|
|
|
|
|
2012-04-14 16:38:52 +00:00
|
|
|
<refsection><title>Examples</title>
|
|
|
|
|
|
|
|
<para>To subscribe to the Nixpkgs channel and install the GNU Hello package:</para>
|
|
|
|
|
|
|
|
<screen>
|
|
|
|
$ nix-channel --add http://nixos.org/releases/nixpkgs/channels/nixpkgs-unstable
|
|
|
|
$ nix-channel --update
|
|
|
|
$ nix-env -iA nixpkgs.hello</screen>
|
|
|
|
|
|
|
|
</refsection>
|
|
|
|
|
2005-04-09 17:16:00 +00:00
|
|
|
</refentry>
|