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.
···4142### Example buildBowerComponents {#ex-buildBowerComponents}
4344-```{=docbook}
45-<programlisting language="nix">
46bowerComponents = buildBowerComponents {
47 name = "my-web-app";
48- generated = ./bower-packages.nix; <co xml:id="ex-buildBowerComponents-1" />
49- src = myWebApp; <co xml:id="ex-buildBowerComponents-2" />
50};
51-</programlisting>
52```
5354In ["buildBowerComponents" example](#ex-buildBowerComponents) the following arguments are of special significance to the function:
5556-```{=docbook}
57-<calloutlist>
58- <callout arearefs="ex-buildBowerComponents-1">
59- <para>
60- <varname>generated</varname> specifies the file which was created by <command>bower2nix</command>.
61- </para>
62- </callout>
63- <callout arearefs="ex-buildBowerComponents-2">
64- <para>
65- <varname>src</varname> is your project's sources. It needs to contain a <filename>bower.json</filename> file.
66- </para>
67- </callout>
68-</calloutlist>
69-```
7071`buildBowerComponents` will run Bower to link together the output of `bower2nix`, resulting in a `bower_components` directory which can be used.
72···9192### Example Full example — default.nix {#ex-buildBowerComponentsDefaultNix}
9394-```{=docbook}
95-<programlisting language="nix">
96{ myWebApp ? { outPath = ./.; name = "myWebApp"; }
97-, pkgs ? import <nixpkgs> {}
98}:
99100pkgs.stdenv.mkDerivation {
···103104 buildInputs = [ pkgs.nodePackages.gulp ];
105106- bowerComponents = pkgs.buildBowerComponents { <co xml:id="ex-buildBowerComponentsDefault-1" />
107 name = "my-web-app";
108 generated = ./bower-packages.nix;
109 src = myWebApp;
110 };
111112 buildPhase = ''
113- cp --reflink=auto --no-preserve=mode -R $bowerComponents/bower_components . <co xml:id="ex-buildBowerComponentsDefault-2" />
114- export HOME=$PWD <co xml:id="ex-buildBowerComponentsDefault-3" />
115- ${pkgs.nodePackages.gulp}/bin/gulp build <co xml:id="ex-buildBowerComponentsDefault-4" />
116 '';
117118 installPhase = "mv gulpdist $out";
119}
120-</programlisting>
121```
122123A few notes about [Full example — `default.nix`](#ex-buildBowerComponentsDefaultNix):
124125-```{=docbook}
126-<calloutlist>
127- <callout arearefs="ex-buildBowerComponentsDefault-1">
128- <para>
129- The result of <varname>buildBowerComponents</varname> is an input to the frontend build.
130- </para>
131- </callout>
132- <callout arearefs="ex-buildBowerComponentsDefault-2">
133- <para>
134- 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.
135- </para>
136- </callout>
137- <callout arearefs="ex-buildBowerComponentsDefault-3">
138- <para>
139- <command>gulp</command> requires <varname>HOME</varname> to refer to a writeable directory.
140- </para>
141- </callout>
142- <callout arearefs="ex-buildBowerComponentsDefault-4">
143- <para>
144- The actual build command. Other tools could be used.
145- </para>
146- </callout>
147-</calloutlist>
148-```
149150## Troubleshooting {#ssec-bower2nix-troubleshooting}
151
···4142### Example buildBowerComponents {#ex-buildBowerComponents}
4344+```nix
045bowerComponents = buildBowerComponents {
46 name = "my-web-app";
47+ generated = ./bower-packages.nix; # note 1
48+ src = myWebApp; # note 2
49};
050```
5152In ["buildBowerComponents" example](#ex-buildBowerComponents) the following arguments are of special significance to the function:
5354+1. `generated` specifies the file which was created by {command}`bower2nix`.
55+2. `src` is your project's sources. It needs to contain a {file}`bower.json` file.
0000000000005657`buildBowerComponents` will run Bower to link together the output of `bower2nix`, resulting in a `bower_components` directory which can be used.
58···7778### Example Full example — default.nix {#ex-buildBowerComponentsDefaultNix}
7980+```nix
081{ myWebApp ? { outPath = ./.; name = "myWebApp"; }
82+, pkgs ? import <nixpkgs> {}
83}:
8485pkgs.stdenv.mkDerivation {
···8889 buildInputs = [ pkgs.nodePackages.gulp ];
9091+ bowerComponents = pkgs.buildBowerComponents { # note 1
92 name = "my-web-app";
93 generated = ./bower-packages.nix;
94 src = myWebApp;
95 };
9697 buildPhase = ''
98+ cp --reflink=auto --no-preserve=mode -R $bowerComponents/bower_components . # note 2
99+ export HOME=$PWD # note 3
100+ ${pkgs.nodePackages.gulp}/bin/gulp build # note 4
101 '';
102103 installPhase = "mv gulpdist $out";
104}
0105```
106107A few notes about [Full example — `default.nix`](#ex-buildBowerComponentsDefaultNix):
108109+1. The result of `buildBowerComponents` is an input to the frontend build.
110+2. Whether to symlink or copy the {file}`bower_components` directory depends on the build tool in use.
111+ In this case a copy is used to avoid {command}`gulp` silliness with permissions.
112+3. {command}`gulp` requires `HOME` to refer to a writeable directory.
113+4. The actual build command in this example is {command}`gulp`. Other tools could be used instead.
0000000000000000000114115## Troubleshooting {#ssec-bower2nix-troubleshooting}
116
+7-22
doc/languages-frameworks/qt.section.md
···1011## Nix expression for a Qt package (default.nix) {#qt-default-nix}
1213-```{=docbook}
14-<programlisting>
15-{ stdenv, lib, qtbase, wrapQtAppsHook }: <co xml:id='qt-default-nix-co-1' />
1617stdenv.mkDerivation {
18 pname = "myapp";
19 version = "1.0";
2021 buildInputs = [ qtbase ];
22- nativeBuildInputs = [ wrapQtAppsHook ]; <co xml:id='qt-default-nix-co-2' />
23}
24-</programlisting>
2526- <calloutlist>
27- <callout arearefs='qt-default-nix-co-1'>
28- <para>
29- Import Qt modules directly, that is: <literal>qtbase</literal>, <literal>qtdeclarative</literal>, etc.
30- <emphasis>Do not</emphasis> import Qt package sets such as <literal>qt5</literal>
31- because the Qt versions of dependencies may not be coherent, causing build and runtime failures.
32- </para>
33- </callout>
34- <callout arearefs='qt-default-nix-co-2'>
35- <para>
36- All Qt packages must include <literal>wrapQtAppsHook</literal> in
37- <literal>nativeBuildInputs</literal>, or you must explicitly set
38- <literal>dontWrapQtApps</literal>.
39- </para>
40- </callout>
41- </calloutlist>
42-```
4344## Locating runtime dependencies {#qt-runtime-dependencies}
45
···1011## Nix expression for a Qt package (default.nix) {#qt-default-nix}
1213+```nix
14+{ stdenv, lib, qtbase, wrapQtAppsHook }:
01516stdenv.mkDerivation {
17 pname = "myapp";
18 version = "1.0";
1920 buildInputs = [ qtbase ];
21+ nativeBuildInputs = [ wrapQtAppsHook ];
22}
23+```
2425+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.
26+27+Additionally all Qt packages must include `wrapQtAppsHook` in `nativeBuildInputs`, or you must explicitly set `dontWrapQtApps`.
000000000000002829## Locating runtime dependencies {#qt-runtime-dependencies}
30