diff --git a/doc/languages-frameworks/bower.section.md b/doc/languages-frameworks/bower.section.md
index 6226dc0702d..c1e5ca4deb7 100644
--- a/doc/languages-frameworks/bower.section.md
+++ b/doc/languages-frameworks/bower.section.md
@@ -41,32 +41,18 @@ The function is implemented in [pkgs/development/bower-modules/generic/default.n
### Example buildBowerComponents {#ex-buildBowerComponents}
-```{=docbook}
-
+```nix
bowerComponents = buildBowerComponents {
name = "my-web-app";
- generated = ./bower-packages.nix;
- src = myWebApp;
+ generated = ./bower-packages.nix; # note 1
+ src = myWebApp; # note 2
};
-
```
In ["buildBowerComponents" example](#ex-buildBowerComponents) the following arguments are of special significance to the function:
-```{=docbook}
-
-
-
- generated specifies the file which was created by bower2nix.
-
-
-
-
- src is your project's sources. It needs to contain a bower.json file.
-
-
-
-```
+1. `generated` specifies the file which was created by {command}`bower2nix`.
+2. `src` is your project's sources. It needs to contain a {file}`bower.json` file.
`buildBowerComponents` will run Bower to link together the output of `bower2nix`, resulting in a `bower_components` directory which can be used.
@@ -91,10 +77,9 @@ gulp.task('build', [], function () {
### Example Full example — default.nix {#ex-buildBowerComponentsDefaultNix}
-```{=docbook}
-
+```nix
{ myWebApp ? { outPath = ./.; name = "myWebApp"; }
-, pkgs ? import <nixpkgs> {}
+, pkgs ? import {}
}:
pkgs.stdenv.mkDerivation {
@@ -103,49 +88,29 @@ pkgs.stdenv.mkDerivation {
buildInputs = [ pkgs.nodePackages.gulp ];
- bowerComponents = pkgs.buildBowerComponents {
+ bowerComponents = pkgs.buildBowerComponents { # note 1
name = "my-web-app";
generated = ./bower-packages.nix;
src = myWebApp;
};
buildPhase = ''
- cp --reflink=auto --no-preserve=mode -R $bowerComponents/bower_components .
- export HOME=$PWD
- ${pkgs.nodePackages.gulp}/bin/gulp build
+ cp --reflink=auto --no-preserve=mode -R $bowerComponents/bower_components . # note 2
+ export HOME=$PWD # note 3
+ ${pkgs.nodePackages.gulp}/bin/gulp build # note 4
'';
installPhase = "mv gulpdist $out";
}
-
```
A few notes about [Full example — `default.nix`](#ex-buildBowerComponentsDefaultNix):
-```{=docbook}
-
-
-
- The result of buildBowerComponents is an input to the frontend build.
-
-
-
-
- Whether to symlink or copy the bower_components directory depends on the build tool in use. In this case a copy is used to avoid gulp silliness with permissions.
-
-
-
-
- gulp requires HOME to refer to a writeable directory.
-
-
-
-
- The actual build command. Other tools could be used.
-
-
-
-```
+1. The result of `buildBowerComponents` is an input to the frontend build.
+2. Whether to symlink or copy the {file}`bower_components` directory depends on the build tool in use.
+ In this case a copy is used to avoid {command}`gulp` silliness with permissions.
+3. {command}`gulp` requires `HOME` to refer to a writeable directory.
+4. The actual build command in this example is {command}`gulp`. Other tools could be used instead.
## Troubleshooting {#ssec-bower2nix-troubleshooting}
diff --git a/doc/languages-frameworks/qt.section.md b/doc/languages-frameworks/qt.section.md
index e09194e391e..2300c5f60ed 100644
--- a/doc/languages-frameworks/qt.section.md
+++ b/doc/languages-frameworks/qt.section.md
@@ -10,37 +10,22 @@ pure and explicit at build-time, at the cost of introducing an extra indirection
## Nix expression for a Qt package (default.nix) {#qt-default-nix}
-```{=docbook}
-
-{ stdenv, lib, qtbase, wrapQtAppsHook }:
+```nix
+{ stdenv, lib, qtbase, wrapQtAppsHook }:
stdenv.mkDerivation {
pname = "myapp";
version = "1.0";
buildInputs = [ qtbase ];
- nativeBuildInputs = [ wrapQtAppsHook ];
+ nativeBuildInputs = [ wrapQtAppsHook ];
}
-
-
-
-
-
- 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.
-
-
-
-
- All Qt packages must include wrapQtAppsHook in
- nativeBuildInputs, or you must explicitly set
- dontWrapQtApps.
-
-
-
```
+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.
+
+Additionally all Qt packages must include `wrapQtAppsHook` in `nativeBuildInputs`, or you must explicitly set `dontWrapQtApps`.
+
## Locating runtime dependencies {#qt-runtime-dependencies}
Qt applications must be wrapped to find runtime dependencies.