doc: add section ids

This commit also use enforces consistent use of the prefixes "sec" for
section and "ssec" for subsection.

+3 -3
doc/coding-conventions.xml
···
<title>Coding conventions</title>
-
<section><title>Syntax</title>
+
<section xml:id="sec-syntax"><title>Syntax</title>
<itemizedlist>
···
</section>
-
<section><title>Package naming</title>
+
<section xml:id="sec-package-naming"><title>Package naming</title>
<para>In Nixpkgs, there are generally three different names associated with a package:
···
<filename>allPackages.nix</filename> or
<filename>AllPackages.nix</filename>.</para>
-
<section><title>Hierarchy</title>
+
<section xml:id="sec-hierarchy"><title>Hierarchy</title>
<para>Each package should be stored in its own directory somewhere in
the <filename>pkgs/</filename> tree, i.e. in
+14 -14
doc/language-support.xml
···
such as Perl or Haskell. These are described in this chapter.</para>
-
<section xml:id="ssec-language-perl"><title>Perl</title>
+
<section xml:id="sec-language-perl"><title>Perl</title>
<para>Nixpkgs provides a function <varname>buildPerlPackage</varname>,
a generic package builder function for any Perl package that has a
···
</para>
-
<section><title>Generation from CPAN</title>
+
<section xml:id="ssec-generation-from-CPAN"><title>Generation from CPAN</title>
<para>Nix expressions for Perl packages can be generated (almost)
automatically from CPAN. This is done by the program
···
</section>
-
<section xml:id="python"><title>Python</title>
+
<section xml:id="sec-python"><title>Python</title>
<para>
Currently supported interpreters are <varname>python26</varname>, <varname>python27</varname>,
···
</varlistentry>
</variablelist>
-
<section xml:id="build-python-package"><title><varname>buildPythonPackage</varname> function</title>
+
<section xml:id="ssec-build-python-package"><title><varname>buildPythonPackage</varname> function</title>
<para>
The function is implemented in <link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/python-modules/generic/default.nix">
···
</section>
-
<section xml:id="python-build-env"><title><function>python.buildEnv</function> function</title>
+
<section xml:id="ssec-python-build-env"><title><function>python.buildEnv</function> function</title>
<para>
Create Python environments using low-level <function>pkgs.buildEnv</function> function. Example <filename>default.nix</filename>:
···
</variablelist>
</section>
-
<section xml:id="python-tools"><title>Tools</title>
+
<section xml:id="ssec-python-tools"><title>Tools</title>
<para>Packages inside nixpkgs are written by hand. However many tools
exist in community to help save time. No tool is preferred at the moment.
···
</section>
-
<section xml:id="python-development"><title>Development</title>
+
<section xml:id="ssec-python-development"><title>Development</title>
<para>
To develop Python packages <function>buildPythonPackage</function> has
···
</section>
-
<section xml:id="python-faq"><title>FAQ</title>
+
<section xml:id="ssec-python-faq"><title>FAQ</title>
<variablelist>
···
</section>
-
<section xml:id="python-contrib"><title>Contributing guidelines</title>
+
<section xml:id="ssec-python-contrib"><title>Contributing guidelines</title>
<para>
Following rules are desired to be respected:
</para>
···
</section>
-
<section xml:id="ssec-language-ruby"><title>Ruby</title>
+
<section xml:id="sec-language-ruby"><title>Ruby</title>
<para>There currently is support to bundle applications that are packaged as Ruby gems. The utility "bundix" allows you to write a <filename>Gemfile</filename>, let bundler create a <filename>Gemfile.lock</filename>, and then convert
this into a nix expression that contains all Gem dependencies automatically.</para>
···
</section>
-
<section xml:id="ssec-language-go"><title>Go</title>
+
<section xml:id="sec-language-go"><title>Go</title>
<para>The function <varname>buildGoPackage</varname> builds
standard Go packages.
···
</section>
-
<section xml:id="ssec-language-java"><title>Java</title>
+
<section xml:id="sec-language-java"><title>Java</title>
<para>Ant-based Java packages are typically built from source as follows:
···
</section>
-
<section xml:id="ssec-language-lua"><title>Lua</title>
+
<section xml:id="sec-language-lua"><title>Lua</title>
<para>
Lua packages are built by the <varname>buildLuaPackage</varname> function. This function is
···
</section>
-
<section xml:id="ssec-language-coq"><title>Coq</title>
+
<section xml:id="sec-language-coq"><title>Coq</title>
<para>
Coq libraries should be installed in
<literal>$(out)/lib/coq/${coq.coq-version}/user-contrib/</literal>.
+2 -1
doc/meta.xml
···
</para>
-
<section><title>Standard meta-attributes</title>
+
<section xml:id="sec-standard-meta-attributes"><title>Standard
+
meta-attributes</title>
<para>It is expected that each meta-attribute is one of the following:</para>
+1 -1
doc/package-notes.xml
···
<!--============================================================-->
-
<section>
+
<section xml:id="sec-xorg">
<title>X.org</title>
+2 -1
doc/packageconfig.xml
···
<filename>lib/licenses.nix</filename> of the nix package tree.
</para>
-
<section><title>Modify packages via <literal>packageOverrides</literal></title>
+
<section xml:id="sec-modify-via-packageOverrides"><title>Modify
+
packages via <literal>packageOverrides</literal></title>
<para>
+17 -13
doc/stdenv.xml
···
can easily customise or override the various build phases.</para>
-
<section><title>Using <literal>stdenv</literal></title>
+
<section xml:id="sec-using-stdenv"><title>Using
+
<literal>stdenv</literal></title>
<para>To build a package with the standard environment, you use the
function <varname>stdenv.mkDerivation</varname>, instead of the
···
</section>
-
<section><title>Tools provided by <literal>stdenv</literal></title>
+
<section xml:id="sec-tools-of-stdenv"><title>Tools provided by
+
<literal>stdenv</literal></title>
<para>The standard environment provides the following packages:
···
</section>
-
<section xml:id="ssec-stdenv-phases"><title>Phases</title>
+
<section xml:id="sec-stdenv-phases"><title>Phases</title>
<para>The generic builder has a number of <emphasis>phases</emphasis>.
Package builds are split into phases to make it easier to override
···
latter is convenient from a build script.</para>
-
<section><title>Controlling phases</title>
+
<section xml:id="ssec-controlling-phases"><title>Controlling
+
phases</title>
<para>There are a number of variables that control what phases are
executed and in what order:
···
</section>
-
<section><title>The unpack phase</title>
+
<section xml:id="ssec-unpack-phase"><title>The unpack phase</title>
<para>The unpack phase is responsible for unpacking the source code of
the package. The default implementation of
···
</section>
-
<section><title>The patch phase</title>
+
<section xml:id="ssec-patch-phase"><title>The patch phase</title>
<para>The patch phase applies the list of patches defined in the
<varname>patches</varname> variable.</para>
···
</section>
-
<section><title>The configure phase</title>
+
<section xml:id="ssec-configure-phase"><title>The configure phase</title>
<para>The configure phase prepares the source tree for building. The
default <function>configurePhase</function> runs
···
</section>
-
<section><title>The build phase</title>
+
<section xml:id="build-phase"><title>The build phase</title>
<para>The build phase is responsible for actually building the package
(e.g. compiling it). The default <function>buildPhase</function>
···
</section>
-
<section><title>The check phase</title>
+
<section xml:id="ssec-check-phase"><title>The check phase</title>
<para>The check phase checks whether the package was built correctly
by running its test suite. The default
···
</section>
-
<section><title>The install phase</title>
+
<section xml:id="ssec-install-phase"><title>The install phase</title>
<para>The install phase is responsible for installing the package in
the Nix store under <envar>out</envar>. The default
···
</section>
-
<section><title>The fixup phase</title>
+
<section xml:id="ssec-fixup-phase"><title>The fixup phase</title>
<para>The fixup phase performs some (Nix-specific) post-processing
actions on the files installed under <filename>$out</filename> by the
···
</section>
-
<section><title>The distribution phase</title>
+
<section xml:id="ssec-distribution-phase"><title>The distribution
+
phase</title>
<para>The distribution phase is intended to produce a source
distribution of the package. The default
···
</section>
-
<section><title>Purity in Nixpkgs</title>
+
<section xml:id="sec-purity-in-nixpkgs"><title>Purity in Nixpkgs</title>
<para>[measures taken to prevent dependencies on packages outside the
store, and what you can do to prevent them]</para>