doc: Untabify so that the examples are correctly rendered.

This commit is contained in:
Ludovic Courtès 2011-10-12 21:42:24 +00:00
parent cfd1da99b9
commit 3fd1dd47e2

View file

@ -225,16 +225,16 @@ in
and non-GNU free software projects: and non-GNU free software projects:
<itemizedlist> <itemizedlist>
<listitem>it uses the GNU Build System, namely GNU Autoconf, <listitem>it uses the GNU Build System, namely GNU Autoconf,
and GNU Automake; for users, it means it can be installed and GNU Automake; for users, it means it can be installed
using the <link using the <link
xlink:href="http://www.gnu.org/prep/standards/html_node/Managing-Releases.html">usual xlink:href="http://www.gnu.org/prep/standards/html_node/Managing-Releases.html">usual
<literal>./configure &amp;&amp; make install</literal> <literal>./configure &amp;&amp; make install</literal>
procedure</link>; procedure</link>;
</listitem> </listitem>
<listitem>it uses Gettext for internationalization;</listitem> <listitem>it uses Gettext for internationalization;</listitem>
<listitem>it has a Texinfo manual, which can be rendered as PDF <listitem>it has a Texinfo manual, which can be rendered as PDF
with TeX.</listitem> with TeX.</listitem>
</itemizedlist> </itemizedlist>
The file defines a jobset consisting of two jobs: The file defines a jobset consisting of two jobs:
@ -244,110 +244,110 @@ in
<calloutlist> <calloutlist>
<callout arearefs='ex-hello-co-nixpkgs'> <callout arearefs='ex-hello-co-nixpkgs'>
<para> <para>
This specifies a function of one named arguments, This specifies a function of one named arguments,
<varname>nixpkgs</varname>. This function and those <varname>nixpkgs</varname>. This function and those
defined below is called by Hydra. Here the defined below is called by Hydra. Here the
<varname>nixpkgs</varname> argument is meant to be a <varname>nixpkgs</varname> argument is meant to be a
checkout of the <link checkout of the <link
xlink:href="http://nixos.org/nixpkgs/">Nixpkgs</link> xlink:href="http://nixos.org/nixpkgs/">Nixpkgs</link>
software distribution. software distribution.
</para> </para>
<para> <para>
Hydra inspects the formal argument list of the function Hydra inspects the formal argument list of the function
(here, the <varname>nixpkgs</varname> argument) and passes (here, the <varname>nixpkgs</varname> argument) and passes
it the corresponding parameter specified as a build input it the corresponding parameter specified as a build input
on Hydra's web interface. In this case, the web interface on Hydra's web interface. In this case, the web interface
should show a <varname>nixpkgs</varname> build input, should show a <varname>nixpkgs</varname> build input,
which is a checkout of the Nixpkgs source code repository. which is a checkout of the Nixpkgs source code repository.
</para> </para>
</callout> </callout>
<callout arearefs='ex-hello-co-import-nixpkgs'> <callout arearefs='ex-hello-co-import-nixpkgs'>
<para> <para>
This defines a variable <varname>pkgs</varname> holding This defines a variable <varname>pkgs</varname> holding
the set of packages provided by Nixpkgs. the set of packages provided by Nixpkgs.
</para> </para>
</callout> </callout>
<callout arearefs='ex-hello-co-jobs'> <callout arearefs='ex-hello-co-jobs'>
<para> <para>
This defines a variable holding the two Hydra This defines a variable holding the two Hydra
jobsan <emphasis>attribute set</emphasis> in Nix. jobsan <emphasis>attribute set</emphasis> in Nix.
</para> </para>
</callout> </callout>
<callout arearefs='ex-hello-co-tarball'> <callout arearefs='ex-hello-co-tarball'>
<para> <para>
This is the definition of the first job, named This is the definition of the first job, named
<varname>tarball</varname>. The purpose of this job is to <varname>tarball</varname>. The purpose of this job is to
produce a usable source code tarball. produce a usable source code tarball.
</para> </para>
</callout> </callout>
<callout arearefs='ex-hello-co-tarball-args'> <callout arearefs='ex-hello-co-tarball-args'>
<para> <para>
The <varname>tarball</varname> takes an additional The <varname>tarball</varname> takes an additional
argument called <varname>helloSrc</varname>. Again, this argument called <varname>helloSrc</varname>. Again, this
argument is passed by Hydra and is meant to be a checkout argument is passed by Hydra and is meant to be a checkout
of GNU Hello's source code repository. of GNU Hello's source code repository.
</para> </para>
</callout> </callout>
<callout arearefs='ex-hello-co-source-tarball'> <callout arearefs='ex-hello-co-source-tarball'>
<para> <para>
The <varname>tarball</varname> job calls the The <varname>tarball</varname> job calls the
<varname>sourceTarball</varname> function, which (roughly) <varname>sourceTarball</varname> function, which (roughly)
runs <command>autoreconf &amp;&amp; ./configure &amp;&amp; runs <command>autoreconf &amp;&amp; ./configure &amp;&amp;
make dist</command> on the checkout. The make dist</command> on the checkout. The
<varname>buildInputs</varname> attribute specifies <varname>buildInputs</varname> attribute specifies
additional software dependencies for the job. additional software dependencies for the job.
</para> </para>
</callout> </callout>
<callout arearefs='ex-hello-co-build'> <callout arearefs='ex-hello-co-build'>
<para> <para>
This is the definition of the <varname>build</varname> This is the definition of the <varname>build</varname>
job, whose purpose is to build Hello from the tarball job, whose purpose is to build Hello from the tarball
produced above. produced above.
</para> </para>
</callout> </callout>
<callout arearefs='ex-hello-co-build-args'> <callout arearefs='ex-hello-co-build-args'>
<para> <para>
The <varname>build</varname> function takes two additional The <varname>build</varname> function takes two additional
parameter: <varname>tarball</varname>, which is meant to parameter: <varname>tarball</varname>, which is meant to
be the result of the <varname>tarball</varname> job, and be the result of the <varname>tarball</varname> job, and
<varname>system</varname>, which should be a string <varname>system</varname>, which should be a string
defining the Nix system typee.g., defining the Nix system typee.g.,
<literal>"x86_64-linux"</literal>. <literal>"x86_64-linux"</literal>.
</para> </para>
<para> <para>
Again, these parameters are passed by Hydra when it calls Again, these parameters are passed by Hydra when it calls
<varname>build</varname>. Thus, they must be defined as <varname>build</varname>. Thus, they must be defined as
build inputs in Hydra: <varname>tarball</varname> should build inputs in Hydra: <varname>tarball</varname> should
have type <literal>Build Output</literal>, its value being have type <literal>Build Output</literal>, its value being
the latest output of the <varname>tarball</varname> job, the latest output of the <varname>tarball</varname> job,
and <varname>system</varname> should be a string. and <varname>system</varname> should be a string.
</para> </para>
<para> <para>
The question mark after <literal>tarball</literal> and The question mark after <literal>tarball</literal> and
<literal>system</literal> defines default values for these <literal>system</literal> defines default values for these
arguments, and is only useful for debugging. arguments, and is only useful for debugging.
</para> </para>
</callout> </callout>
<callout arearefs='ex-hello-co-nix-build'> <callout arearefs='ex-hello-co-nix-build'>
<para> <para>
The <varname>build</varname> job calls the The <varname>build</varname> job calls the
<varname>nixBuild</varname> function, which unpacks the <varname>nixBuild</varname> function, which unpacks the
tarball, then runs <command>./configure &amp;&amp; make tarball, then runs <command>./configure &amp;&amp; make
&amp;&amp; make check &amp;&amp; make install</command>. &amp;&amp; make check &amp;&amp; make install</command>.
</para> </para>
</callout> </callout>
<callout arearefs='ex-hello-co-body'> <callout arearefs='ex-hello-co-body'>
<para> <para>
Finally, the set of jobs is returned to Hydra, as a Nix Finally, the set of jobs is returned to Hydra, as a Nix
attribute set. attribute set.
</para> </para>
</callout> </callout>
</calloutlist> </calloutlist>
</para> </para>
</section> </section>
@ -368,14 +368,14 @@ in
linkend='ex-hello' />, just run: linkend='ex-hello' />, just run:
<screen> <screen>
$ nix-build release.nix -A tarball $ nix-build release.nix -A tarball
</screen> </screen>
However, doing this with <xref linkend='ex-hello' /> as is will However, doing this with <xref linkend='ex-hello' /> as is will
probably yield an error like this: probably yield an error like this:
<screen> <screen>
error: cannot auto-call a function that has an argument without a default value (`nixpkgs') error: cannot auto-call a function that has an argument without a default value (`nixpkgs')
</screen> </screen>
This is because no value was specified for the This is because no value was specified for the
@ -400,13 +400,13 @@ in
<varname>tarball</varname> jobset can now be evaluated by running: <varname>tarball</varname> jobset can now be evaluated by running:
<screen> <screen>
$ nix-build -I ~/src release.nix -A tarball $ nix-build -I ~/src release.nix -A tarball
</screen> </screen>
Similarly, the <varname>build</varname> jobset can be evaluated: Similarly, the <varname>build</varname> jobset can be evaluated:
<screen> <screen>
$ nix-build -I ~/src release.nix -A build $ nix-build -I ~/src release.nix -A build
</screen> </screen>
The <varname>build</varname> job reuses the result of the The <varname>build</varname> job reuses the result of the
@ -483,9 +483,9 @@ in
in in
pkgs.lib.overrideDerivation build (attrs: { pkgs.lib.overrideDerivation build (attrs: {
buildInputs = [ pkgs.gcc33 ]; buildInputs = [ pkgs.gcc33 ];
preConfigure = "gcc --version"; preConfigure = "gcc --version";
configureFlags = configureFlags =
attrs.configureFlags ++ [ "--disable-nls" ]; attrs.configureFlags ++ [ "--disable-nls" ];
}); </programlisting> }); </programlisting>
The <varname>build_exotic</varname> job reuses The <varname>build_exotic</varname> job reuses
@ -506,3 +506,10 @@ in
</chapter> </chapter>
<!--
Local Variables:
indent-tabs-mode: nil
ispell-local-dictionary: "american"
End:
-->