git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #8092 from NixOS/nixpkgs-manual-add-section-ids

doc: add section ids

commiteb2a02dd4ade23b0aabfe8a819415ab6b667de3d authorDomen Kožar <domen@dev.si> dateSun 31 May 2015, 19:00 (12 years ago) parent7d2b98353b5d94
6 files changed+39−33
doc/coding-conventions.xml+3−3 doc/language-support.xml+14−14 doc/meta.xml+2−1 doc/package-notes.xml+1−1 doc/packageconfig.xml+2−1 doc/stdenv.xml+17−13
doc/coding-conventions.xml+3−3
@@ -5,7 +5,7 @@
55<title>Coding conventions</title>
66
77
8−<section><title>Syntax</title>
8+<section xml:id="sec-syntax"><title>Syntax</title>
99
1010<itemizedlist>
1111
@@ -207,7 +207,7 @@ args.stdenv.mkDerivation (args // {
207207</section>
208208
209209
210−<section><title>Package naming</title>
210+<section xml:id="sec-package-naming"><title>Package naming</title>
211211
212212<para>In Nixpkgs, there are generally three different names associated with a package:
213213
@@ -292,7 +292,7 @@ dashes between words — not in camel case. For instance, it should be
292292<filename>allPackages.nix</filename> or
293293<filename>AllPackages.nix</filename>.</para>
294294
295−<section><title>Hierarchy</title>
295+<section xml:id="sec-hierarchy"><title>Hierarchy</title>
296296
297297<para>Each package should be stored in its own directory somewhere in
298298the <filename>pkgs/</filename> tree, i.e. in
doc/language-support.xml+14−14
@@ -13,7 +13,7 @@ in Nixpkgs to easily build packages for other programming languages,
1313such as Perl or Haskell. These are described in this chapter.</para>
1414
1515
16−<section xml:id="ssec-language-perl"><title>Perl</title>
16+<section xml:id="sec-language-perl"><title>Perl</title>
1717
1818<para>Nixpkgs provides a function <varname>buildPerlPackage</varname>,
1919a generic package builder function for any Perl package that has a
@@ -151,7 +151,7 @@ ClassC3Componentised = buildPerlPackage rec {
151151
152152</para>
153153
154−<section><title>Generation from CPAN</title>
154+<section xml:id="ssec-generation-from-CPAN"><title>Generation from CPAN</title>
155155
156156<para>Nix expressions for Perl packages can be generated (almost)
157157automatically from CPAN. This is done by the program
@@ -191,7 +191,7 @@ you need it.</para>
191191</section>
192192
193193
194−<section xml:id="python"><title>Python</title>
194+<section xml:id="sec-python"><title>Python</title>
195195
196196<para>
197197 Currently supported interpreters are <varname>python26</varname>, <varname>python27</varname>,
@@ -276,7 +276,7 @@ are provided with all modules included.</para>
276276 </varlistentry>
277277
278278</variablelist>
279−<section xml:id="build-python-package"><title><varname>buildPythonPackage</varname> function</title>
279+<section xml:id="ssec-build-python-package"><title><varname>buildPythonPackage</varname> function</title>
280280
281281 <para>
282282 The function is implemented in <link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/python-modules/generic/default.nix">
@@ -438,7 +438,7 @@ twisted = buildPythonPackage {
438438
439439</section>
440440
441−<section xml:id="python-build-env"><title><function>python.buildEnv</function> function</title>
441+<section xml:id="ssec-python-build-env"><title><function>python.buildEnv</function> function</title>
442442 <para>
443443 Create Python environments using low-level <function>pkgs.buildEnv</function> function. Example <filename>default.nix</filename>:
444444
@@ -484,7 +484,7 @@ python.buildEnv.override {
484484 </variablelist>
485485</section>
486486
487−<section xml:id="python-tools"><title>Tools</title>
487+<section xml:id="ssec-python-tools"><title>Tools</title>
488488
489489<para>Packages inside nixpkgs are written by hand. However many tools
490490exist in community to help save time. No tool is preferred at the moment.
@@ -511,7 +511,7 @@ exist in community to help save time. No tool is preferred at the moment.
511511
512512</section>
513513
514−<section xml:id="python-development"><title>Development</title>
514+<section xml:id="ssec-python-development"><title>Development</title>
515515
516516 <para>
517517 To develop Python packages <function>buildPythonPackage</function> has
@@ -555,7 +555,7 @@ buildPythonPackage {
555555
556556</section>
557557
558−<section xml:id="python-faq"><title>FAQ</title>
558+<section xml:id="ssec-python-faq"><title>FAQ</title>
559559
560560<variablelist>
561561
@@ -597,7 +597,7 @@ sed -i '/ = data_files/d' setup.py</programlisting>
597597</section>
598598
599599
600−<section xml:id="python-contrib"><title>Contributing guidelines</title>
600+<section xml:id="ssec-python-contrib"><title>Contributing guidelines</title>
601601<para>
602602 Following rules are desired to be respected:
603603</para>
@@ -625,7 +625,7 @@ sed -i '/ = data_files/d' setup.py</programlisting>
625625</section>
626626
627627
628−<section xml:id="ssec-language-ruby"><title>Ruby</title>
628+<section xml:id="sec-language-ruby"><title>Ruby</title>
629629 <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
630630 this into a nix expression that contains all Gem dependencies automatically.</para>
631631
@@ -666,7 +666,7 @@ and scalable.";
666666
667667</section>
668668
669−<section xml:id="ssec-language-go"><title>Go</title>
669+<section xml:id="sec-language-go"><title>Go</title>
670670
671671<para>The function <varname>buildGoPackage</varname> builds
672672standard Go packages.
@@ -787,7 +787,7 @@ done
787787</section>
788788
789789
790−<section xml:id="ssec-language-java"><title>Java</title>
790+<section xml:id="sec-language-java"><title>Java</title>
791791
792792<para>Ant-based Java packages are typically built from source as follows:
793793
@@ -868,7 +868,7 @@ Runtime) instead of the OpenJRE.</para>
868868</section>
869869
870870
871−<section xml:id="ssec-language-lua"><title>Lua</title>
871+<section xml:id="sec-language-lua"><title>Lua</title>
872872
873873<para>
874874 Lua packages are built by the <varname>buildLuaPackage</varname> function. This function is
@@ -915,7 +915,7 @@ fileSystem = buildLuaPackage {
915915
916916</section>
917917
918−<section xml:id="ssec-language-coq"><title>Coq</title>
918+<section xml:id="sec-language-coq"><title>Coq</title>
919919 <para>
920920 Coq libraries should be installed in
921921 <literal>$(out)/lib/coq/${coq.coq-version}/user-contrib/</literal>.
doc/meta.xml+2−1
@@ -82,7 +82,8 @@ hello-2.3 A program that produces a familiar, friendly greeting
8282</para>
8383
8484
85−<section><title>Standard meta-attributes</title>
85+<section xml:id="sec-standard-meta-attributes"><title>Standard
86+meta-attributes</title>
8687
8788<para>It is expected that each meta-attribute is one of the following:</para>
8889
doc/package-notes.xml+1−1
@@ -141,7 +141,7 @@ $ make menuconfig ARCH=<replaceable>arch</replaceable></screen>
141141
142142<!--============================================================-->
143143
144−<section>
144+<section xml:id="sec-xorg">
145145
146146<title>X.org</title>
147147
doc/packageconfig.xml+2−1
@@ -67,7 +67,8 @@
6767 <filename>lib/licenses.nix</filename> of the nix package tree.
6868 </para>
6969
70−<section><title>Modify packages via <literal>packageOverrides</literal></title>
70+<section xml:id="sec-modify-via-packageOverrides"><title>Modify
71+packages via <literal>packageOverrides</literal></title>
7172
7273<para>
7374
doc/stdenv.xml+17−13
@@ -15,7 +15,8 @@ environment does everything automatically. If
1515can easily customise or override the various build phases.</para>
1616
1717
18−<section><title>Using <literal>stdenv</literal></title>
18+<section xml:id="sec-using-stdenv"><title>Using
19+<literal>stdenv</literal></title>
1920
2021<para>To build a package with the standard environment, you use the
2122function <varname>stdenv.mkDerivation</varname>, instead of the
@@ -124,7 +125,8 @@ genericBuild
124125</section>
125126
126127
127−<section><title>Tools provided by <literal>stdenv</literal></title>
128+<section xml:id="sec-tools-of-stdenv"><title>Tools provided by
129+<literal>stdenv</literal></title>
128130
129131<para>The standard environment provides the following packages:
130132
@@ -225,7 +227,7 @@ genericBuild
225227</section>
226228
227229
228−<section xml:id="ssec-stdenv-phases"><title>Phases</title>
230+<section xml:id="sec-stdenv-phases"><title>Phases</title>
229231
230232<para>The generic builder has a number of <emphasis>phases</emphasis>.
231233Package builds are split into phases to make it easier to override
@@ -243,7 +245,8 @@ is convenient to override a phase from the derivation, while the
243245latter is convenient from a build script.</para>
244246
245247
246−<section><title>Controlling phases</title>
248+<section xml:id="ssec-controlling-phases"><title>Controlling
249+phases</title>
247250
248251<para>There are a number of variables that control what phases are
249252executed and in what order:
@@ -327,7 +330,7 @@ executed and in what order:
327330</section>
328331
329332
330−<section><title>The unpack phase</title>
333+<section xml:id="ssec-unpack-phase"><title>The unpack phase</title>
331334
332335<para>The unpack phase is responsible for unpacking the source code of
333336the package. The default implementation of
@@ -434,7 +437,7 @@ Additional file types can be supported by setting the
434437</section>
435438
436439
437−<section><title>The patch phase</title>
440+<section xml:id="ssec-patch-phase"><title>The patch phase</title>
438441
439442<para>The patch phase applies the list of patches defined in the
440443<varname>patches</varname> variable.</para>
@@ -477,7 +480,7 @@ Additional file types can be supported by setting the
477480</section>
478481
479482
480−<section><title>The configure phase</title>
483+<section xml:id="ssec-configure-phase"><title>The configure phase</title>
481484
482485<para>The configure phase prepares the source tree for building. The
483486default <function>configurePhase</function> runs
@@ -573,7 +576,7 @@ script) if it exists.</para>
573576</section>
574577
575578
576−<section><title>The build phase</title>
579+<section xml:id="build-phase"><title>The build phase</title>
577580
578581<para>The build phase is responsible for actually building the package
579582(e.g. compiling it). The default <function>buildPhase</function>
@@ -657,7 +660,7 @@ called, respectively.</para>
657660</section>
658661
659662
660−<section><title>The check phase</title>
663+<section xml:id="ssec-check-phase"><title>The check phase</title>
661664
662665<para>The check phase checks whether the package was built correctly
663666by running its test suite. The default
@@ -717,7 +720,7 @@ doCheck = true;</programlisting>
717720</section>
718721
719722
720−<section><title>The install phase</title>
723+<section xml:id="ssec-install-phase"><title>The install phase</title>
721724
722725<para>The install phase is responsible for installing the package in
723726the Nix store under <envar>out</envar>. The default
@@ -772,7 +775,7 @@ installTargets = "install-bin install-doc";</programlisting>
772775</section>
773776
774777
775−<section><title>The fixup phase</title>
778+<section xml:id="ssec-fixup-phase"><title>The fixup phase</title>
776779
777780<para>The fixup phase performs some (Nix-specific) post-processing
778781actions on the files installed under <filename>$out</filename> by the
@@ -895,7 +898,8 @@ following:
895898</section>
896899
897900
898−<section><title>The distribution phase</title>
901+<section xml:id="ssec-distribution-phase"><title>The distribution
902+phase</title>
899903
900904<para>The distribution phase is intended to produce a source
901905distribution of the package. The default
@@ -1199,7 +1203,7 @@ echo @foo@
11991203</section>
12001204
12011205
1202−<section><title>Purity in Nixpkgs</title>
1206+<section xml:id="sec-purity-in-nixpkgs"><title>Purity in Nixpkgs</title>
12031207
12041208<para>[measures taken to prevent dependencies on packages outside the
12051209store, and what you can do to prevent them]</para>