[% WRAPPER layout.tt title="Channel ${channelName}" %]
[% PROCESS common.tt %]
[% USE HTML %]

<p>This page provides a <em>channel</em> for the <a
href="http://nixos.org/">Nix package manager</a>.  If you have Nix
installed, you can subscribe to this channel by once executing</p>

<div class="card bg-light"><div class="card-body"><pre>
<span class="shell-prompt">$ </span>nix-channel --add [% curUri +%]
<span class="shell-prompt">$ </span>nix-channel --update
</pre></div></div>

<p>You can then query and install packages in the normal way, e.g.,</p>

<div class="card bg-light"><div class="card-body"><pre>
<span class="shell-prompt">$ </span>nix-env -qa '*'
<span class="shell-prompt">$ </span>nix-env -i foo
</pre></pre></div>

<p>You can update to the latest versions of the packages in this channel by executing</p>

<div class="card bg-light"><div class="card-body"><pre>
<span class="shell-prompt">$ </span>nix-channel --update
<span class="shell-prompt">$ </span>nix-env -u '*'
</pre></div></div>

[% IF genericChannel %]

<h2>Packages</h2>

<p>This channel contains the following packages.</p>

<table class="table table-condensed table-striped clickable-rows">

  <thead>
    <tr>
      <th>#</th>
      <th>Name</th>
      <th>System</th>
      <th>Description</th>
    </tr>
  </thead>

  <tbody>

    [% FOREACH pkg IN nixPkgs %]

      [% b = pkg.build %]

      <tr>
        <td><a href="[% c.uri_for('/build' b.id) %]">[% b.id %]</a></td>
        <td><tt>[% b.get_column('releasename') || b.nixname %]</tt></td>
        <td><tt>[% b.system %]</tt></td>
        <td>
          [% IF b.homepage %]
            <a [% HTML.attributes(href => b.homepage) %]>[% HTML.escape(b.description) %]</a>
          [% ELSE %]
            [% HTML.escape(b.description) %]
          [% END %]
        </td>
      </tr>

    [% END %]

  </tbody>

</table>

[% ELSE %]
[% PROCESS "product-list.tt" %]

<h2>Contents</h2>

[% INCLUDE renderProductList build=lastSuccessful %]

<p>Upgrades depend on the success/failure of the following constituents:</p>

[% INCLUDE renderBuildList builds=constituents %]

[% END %]

[% END %]