hydra/src/root/product-list.tt
2014-10-07 18:12:00 +02:00

216 lines
8.3 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[% BLOCK renderProductLinks %]
<tr>
<th>URL:</th>
<td><a href="[% uri %]"><tt>[% uri %]</tt></a></td>
</tr>
[% IF latestRoot %]
<tr>
<th>Links to latest:</th>
<td>
[% uri2 = "${c.uri_for(latestRoot.join('/') 'download-by-type' product.type product.subtype)}" %]
<a href="[% uri2 %]"><tt>[% uri2 %]</tt></a>
<br />
[% uri2 = "${c.uri_for(latestRoot.join('/') 'download' product.productnr)}" %]
<a href="[% uri2 %]"><tt>[% uri2 %]</tt></a>
</td>
</tr>
[% END %]
[% END %]
[% BLOCK renderProductList %]
<table class="productList">
[% FOREACH product IN build.buildproducts %]
[% uri = "${c.uri_for('/build' build.id 'download' product.productnr)}"
_ (product.name ? "/" _ product.name : "")
_ (product.defaultpath ? "/" _ product.defaultpath : "") %]
[% contents = c.uri_for('/build' build.id 'contents' product.productnr) %]
[% SWITCH product.type %]
[% CASE "nix-build" %]
[% IF build.buildstatus == 6 %]
[% filename = build.nixname _ (product.subtype ? "-" _ product.subtype : "") _ ".closure.gz" %]
[% uri = c.uri_for('/build' build.id 'nix' 'closure' filename ) %]
<tr class="product">
<td>
<a href="[% contents %]">
<img src="[% c.uri_for("/static/images/error_32.png") %]" alt="Source" />
Failed build produced output. Click here to inspect the output.
</a>
[% WRAPPER makePopover title="Help" classes="btn-mini" %]
<p>If you have Nix installed on your machine, this failed build output and
all its dependencies can be unpacked into your local Nix store by doing:</p>
<pre><span class="shell-prompt">$ </span>curl [% uri %] | gunzip | nix-store --import</pre>
<p>The build output can then be found in the path <tt>[% product.path %]</tt>.</p>
[% END %]
</td>
</tr>
[% ELSE %]
<tr class="product">
<td>
[% uri = c.uri_for('/build' build.id 'nix' 'pkg' "${build.nixname}-${build.system}.nixpkg") %]
<a href="[% uri %]">
<img src="[% c.uri_for("/static/images/nix-build.png") %]" alt="Source" />
One-click install of Nix package <tt>[% build.nixname %]</tt>
</a>
[% WRAPPER makePopover title="Help" classes="btn-mini" %]
<p>If you have Nix installed on your machine, you can
install this package and all its dependencies automatically
by clicking on the link above. This requires that you have
the <tt>application/nix-package</tt> MIME type associated
with the <tt>nix-install-package</tt> program in your web
browser. Alternatively, you can install it from the
command-line:</p>
<pre><span class="shell-prompt">$ </span>nix-install-package --non-interactive --url [% uri %]</pre>
<p>If you get an error message “Permission denied”, you
should make sure that you have sufficient access rights to
the Nix store, e.g., run the command as <tt>root</tt>.</p>
[% END %]
<a class="btn btn-mini" href="[% contents %]">Contents</a>
</td>
</tr>
<tr class="product">
<td>
[% filename = build.nixname _ (product.subtype ? "-" _ product.subtype : "") _ ".closure.gz" %]
[% uri = c.uri_for('/build' build.id 'nix' 'closure' filename ) %]
<a href="[% uri %]">
<img src="[% c.uri_for("/static/images/nix-build.png") %]" alt="Source" />
Nix closure of path <tt>[% product.path %]</tt>
</a>
[% WRAPPER makePopover title="Help" classes="btn-mini" %]
<p>If you have Nix installed on your machine, this build and
all its dependencies can be unpacked into your local Nix
store by doing:</p>
<pre><span class="shell-prompt">$ </span>gunzip &lt; [% filename %] | nix-store --import</pre>
<p>or to download and unpack in one command:</p>
<pre><span class="shell-prompt">$ </span>curl [% uri %] | gunzip | nix-store --import</pre>
<p>The package can then be found in the path <tt>[%
product.path %]</tt>. Youll probably also want to do</p>
<pre><span class="shell-prompt">$ </span>nix-env -i [% product.path %]</pre>
<p>to actually install the package in your Nix user environment.</p>
<p>If you get the error message “imported
archive lacks a signature”, you should make sure that you have
sufficient access rights to the Nix store, e.g., run the
command as <tt>root</tt>.</p>
[% END %]
</td>
</tr>
[% END %]
[% CASE "file" %]
<tr class="product">
<td>
<a href="[% uri %]">
[% SWITCH product.subtype %]
[% CASE "source-dist" %]
<img src="[% c.uri_for("/static/images/source-dist.png") %]" alt="Source" /> Source distribution <tt>[% product.name %]</tt>
[% CASE "rpm" %]
<img src="[% c.uri_for("/static/images/rpm.png") %]" alt="RPM" /> RPM package <tt>[% product.name %]</tt>
[% CASE "srpm" %]
<img src="[% c.uri_for("/static/images/rpm.png") %]" alt="Source RPM" /> Source RPM package <tt>[% product.name %]</tt>
[% CASE "deb" %]
<img src="[% c.uri_for("/static/images/debian.png") %]" alt="RPM" /> Debian package <tt>[% product.name %]</tt>
[% CASE "iso" %]
<img src="[% c.uri_for("/static/images/iso.png") %]" alt="ISO" /> ISO-9660 CD/DVD image <tt>[% product.name %]</tt>
[% CASE "binary-dist" %]
<img src="[% c.uri_for("/static/images/binary-dist.png") %]" alt="Binary distribution" /> Binary distribution <tt>[% product.name %]</tt>
[% CASE DEFAULT %]
File <tt>[% product.name %]</tt> of type <tt>[% product.subtype %]</tt>
[% END %]
</a>
[% WRAPPER makePopover title="Details" classes="btn-mini" %]
<table class="info-table">
[% INCLUDE renderProductLinks %]
<tr><th>File size:</th><td>[% product.filesize %] bytes ([% mibs(product.filesize / (1024 * 1024)) %] MiB)</td></tr>
<tr><th>SHA-1 hash:</th><td><tt>[% product.sha1hash %]</tt></td></tr>
<tr><th>SHA-256 hash:</th><td><tt>[% product.sha256hash %]</tt></td></tr>
<tr><th>Full path:</th><td><tt>[% product.path %]</tt></td></tr>
</table>
[% END %]
<a class="btn btn-mini" href="[% contents %]">Contents</a>
</td>
</tr>
[% CASE "report" %]
<tr class="product">
<td>
<a href="[% uri %]">
<img src="[% c.uri_for("/static/images/report.png") %]" alt="Report" />
[% SWITCH product.subtype %]
[% CASE "coverage" %]
Code coverage analysis report
[% CASE DEFAULT %]
Report of type <tt>[% product.subtype %]</tt>
[% END %]
</a>
</td>
</tr>
[% CASE ["doc", "doc-pdf"] %]
<tr class="product">
<td>
<a href="[% uri %]">
[% IF product.type == "doc-pdf" %]
<img src="[% c.uri_for("/static/images/pdf.png") %]" alt="PDF document" />
[% ELSE %]
<img src="[% c.uri_for("/static/images/document.png") %]" alt="Document" />
[% END %]
[% SWITCH product.subtype %]
[% CASE "readme" %]
Read Me!
[% CASE "manual" %]
Manual
[% CASE "release-notes" %]
Release notes
[% CASE DEFAULT %]
Documentation of type <tt>[% product.subtype %]</tt>
[% END %]
</a>
[% WRAPPER makePopover title="Details" classes="btn-mini" %]
<table class="info-table">
[% INCLUDE renderProductLinks %]
</table>
[% END %]
</td>
</tr>
[% CASE DEFAULT %]
<tr class="product">
<td>
Something of type <tt>[% product.type %]</tt> [% product %]
</td>
</tr>
[% END %]
[% END %]
</table>
[% END %]