nixos-render-docs does not support this, and since the examples are small there isn't that much value in callouts here. change them to simple MD code blocks and lists instead.
···41414242### Example buildBowerComponents {#ex-buildBowerComponents}
43434444-```{=docbook}
4545-<programlisting language="nix">
4444+```nix
4645bowerComponents = buildBowerComponents {
4746 name = "my-web-app";
4848- generated = ./bower-packages.nix; <co xml:id="ex-buildBowerComponents-1" />
4949- src = myWebApp; <co xml:id="ex-buildBowerComponents-2" />
4747+ generated = ./bower-packages.nix; # note 1
4848+ src = myWebApp; # note 2
5049};
5151-</programlisting>
5250```
53515452In ["buildBowerComponents" example](#ex-buildBowerComponents) the following arguments are of special significance to the function:
55535656-```{=docbook}
5757-<calloutlist>
5858- <callout arearefs="ex-buildBowerComponents-1">
5959- <para>
6060- <varname>generated</varname> specifies the file which was created by <command>bower2nix</command>.
6161- </para>
6262- </callout>
6363- <callout arearefs="ex-buildBowerComponents-2">
6464- <para>
6565- <varname>src</varname> is your project's sources. It needs to contain a <filename>bower.json</filename> file.
6666- </para>
6767- </callout>
6868-</calloutlist>
6969-```
5454+1. `generated` specifies the file which was created by {command}`bower2nix`.
5555+2. `src` is your project's sources. It needs to contain a {file}`bower.json` file.
70567157`buildBowerComponents` will run Bower to link together the output of `bower2nix`, resulting in a `bower_components` directory which can be used.
7258···91779278### Example Full example — default.nix {#ex-buildBowerComponentsDefaultNix}
93799494-```{=docbook}
9595-<programlisting language="nix">
8080+```nix
9681{ myWebApp ? { outPath = ./.; name = "myWebApp"; }
9797-, pkgs ? import <nixpkgs> {}
8282+, pkgs ? import <nixpkgs> {}
9883}:
998410085pkgs.stdenv.mkDerivation {
···1038810489 buildInputs = [ pkgs.nodePackages.gulp ];
10590106106- bowerComponents = pkgs.buildBowerComponents { <co xml:id="ex-buildBowerComponentsDefault-1" />
9191+ bowerComponents = pkgs.buildBowerComponents { # note 1
10792 name = "my-web-app";
10893 generated = ./bower-packages.nix;
10994 src = myWebApp;
11095 };
1119611297 buildPhase = ''
113113- cp --reflink=auto --no-preserve=mode -R $bowerComponents/bower_components . <co xml:id="ex-buildBowerComponentsDefault-2" />
114114- export HOME=$PWD <co xml:id="ex-buildBowerComponentsDefault-3" />
115115- ${pkgs.nodePackages.gulp}/bin/gulp build <co xml:id="ex-buildBowerComponentsDefault-4" />
9898+ cp --reflink=auto --no-preserve=mode -R $bowerComponents/bower_components . # note 2
9999+ export HOME=$PWD # note 3
100100+ ${pkgs.nodePackages.gulp}/bin/gulp build # note 4
116101 '';
117102118103 installPhase = "mv gulpdist $out";
119104}
120120-</programlisting>
121105```
122106123107A few notes about [Full example — `default.nix`](#ex-buildBowerComponentsDefaultNix):
124108125125-```{=docbook}
126126-<calloutlist>
127127- <callout arearefs="ex-buildBowerComponentsDefault-1">
128128- <para>
129129- The result of <varname>buildBowerComponents</varname> is an input to the frontend build.
130130- </para>
131131- </callout>
132132- <callout arearefs="ex-buildBowerComponentsDefault-2">
133133- <para>
134134- Whether to symlink or copy the <filename>bower_components</filename> directory depends on the build tool in use. In this case a copy is used to avoid <command>gulp</command> silliness with permissions.
135135- </para>
136136- </callout>
137137- <callout arearefs="ex-buildBowerComponentsDefault-3">
138138- <para>
139139- <command>gulp</command> requires <varname>HOME</varname> to refer to a writeable directory.
140140- </para>
141141- </callout>
142142- <callout arearefs="ex-buildBowerComponentsDefault-4">
143143- <para>
144144- The actual build command. Other tools could be used.
145145- </para>
146146- </callout>
147147-</calloutlist>
148148-```
109109+1. The result of `buildBowerComponents` is an input to the frontend build.
110110+2. Whether to symlink or copy the {file}`bower_components` directory depends on the build tool in use.
111111+ In this case a copy is used to avoid {command}`gulp` silliness with permissions.
112112+3. {command}`gulp` requires `HOME` to refer to a writeable directory.
113113+4. The actual build command in this example is {command}`gulp`. Other tools could be used instead.
149114150115## Troubleshooting {#ssec-bower2nix-troubleshooting}
151116
+7-22
doc/languages-frameworks/qt.section.md
···10101111## Nix expression for a Qt package (default.nix) {#qt-default-nix}
12121313-```{=docbook}
1414-<programlisting>
1515-{ stdenv, lib, qtbase, wrapQtAppsHook }: <co xml:id='qt-default-nix-co-1' />
1313+```nix
1414+{ stdenv, lib, qtbase, wrapQtAppsHook }:
16151716stdenv.mkDerivation {
1817 pname = "myapp";
1918 version = "1.0";
20192120 buildInputs = [ qtbase ];
2222- nativeBuildInputs = [ wrapQtAppsHook ]; <co xml:id='qt-default-nix-co-2' />
2121+ nativeBuildInputs = [ wrapQtAppsHook ];
2322}
2424-</programlisting>
2323+```
25242626- <calloutlist>
2727- <callout arearefs='qt-default-nix-co-1'>
2828- <para>
2929- Import Qt modules directly, that is: <literal>qtbase</literal>, <literal>qtdeclarative</literal>, etc.
3030- <emphasis>Do not</emphasis> import Qt package sets such as <literal>qt5</literal>
3131- because the Qt versions of dependencies may not be coherent, causing build and runtime failures.
3232- </para>
3333- </callout>
3434- <callout arearefs='qt-default-nix-co-2'>
3535- <para>
3636- All Qt packages must include <literal>wrapQtAppsHook</literal> in
3737- <literal>nativeBuildInputs</literal>, or you must explicitly set
3838- <literal>dontWrapQtApps</literal>.
3939- </para>
4040- </callout>
4141- </calloutlist>
4242-```
2525+It is important to import Qt modules directly, that is: `qtbase`, `qtdeclarative`, etc. *Do not* import Qt package sets such as `qt5` because the Qt versions of dependencies may not be coherent, causing build and runtime failures.
2626+2727+Additionally all Qt packages must include `wrapQtAppsHook` in `nativeBuildInputs`, or you must explicitly set `dontWrapQtApps`.
43284429## Locating runtime dependencies {#qt-runtime-dependencies}
4530