about summary refs log tree commit diff
path: root/nixpkgs/doc/languages-frameworks
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2021-06-22 15:01:47 +0000
committerAlyssa Ross <hi@alyssa.is>2021-06-22 16:57:59 +0000
commit633cab0ecb07627706c6b523e219490f019eaab5 (patch)
tree4fb472bdfe2723037dad53dc1b8a87c939015f5e /nixpkgs/doc/languages-frameworks
parentffb691c199e7e0cbc4e45e5310779c9e3f7c2a73 (diff)
parent432fc2d9a67f92e05438dff5fdc2b39d33f77997 (diff)
downloadnixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar
nixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar.gz
nixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar.bz2
nixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar.lz
nixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar.xz
nixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar.zst
nixlib-633cab0ecb07627706c6b523e219490f019eaab5.zip
Merge commit '432fc2d9a67f92e05438dff5fdc2b39d33f77997'
# Conflicts:
#	nixpkgs/pkgs/applications/editors/emacs/elisp-packages/elpa-generated.nix
#	nixpkgs/pkgs/applications/networking/mailreaders/thunderbird/default.nix
#	nixpkgs/pkgs/applications/window-managers/sway/default.nix
#	nixpkgs/pkgs/build-support/rust/default.nix
#	nixpkgs/pkgs/development/go-modules/generic/default.nix
Diffstat (limited to 'nixpkgs/doc/languages-frameworks')
-rw-r--r--nixpkgs/doc/languages-frameworks/agda.section.md132
-rw-r--r--nixpkgs/doc/languages-frameworks/android.section.md33
-rw-r--r--nixpkgs/doc/languages-frameworks/beam.section.md26
-rw-r--r--nixpkgs/doc/languages-frameworks/bower.section.md2
-rw-r--r--nixpkgs/doc/languages-frameworks/coq.section.md4
-rw-r--r--nixpkgs/doc/languages-frameworks/crystal.section.md4
-rw-r--r--nixpkgs/doc/languages-frameworks/dhall.section.md432
-rw-r--r--nixpkgs/doc/languages-frameworks/dotnet.section.md18
-rw-r--r--nixpkgs/doc/languages-frameworks/emscripten.section.md14
-rw-r--r--nixpkgs/doc/languages-frameworks/gnome.section.md8
-rw-r--r--nixpkgs/doc/languages-frameworks/go.section.md23
-rw-r--r--nixpkgs/doc/languages-frameworks/idris.section.md26
-rw-r--r--nixpkgs/doc/languages-frameworks/index.xml1
-rw-r--r--nixpkgs/doc/languages-frameworks/ios.section.md17
-rw-r--r--nixpkgs/doc/languages-frameworks/lua.section.md56
-rw-r--r--nixpkgs/doc/languages-frameworks/maven.section.md17
-rw-r--r--nixpkgs/doc/languages-frameworks/python.section.md127
-rw-r--r--nixpkgs/doc/languages-frameworks/qt.section.md11
-rw-r--r--nixpkgs/doc/languages-frameworks/r.section.md10
-rw-r--r--nixpkgs/doc/languages-frameworks/ruby.section.md24
-rw-r--r--nixpkgs/doc/languages-frameworks/rust.section.md179
-rw-r--r--nixpkgs/doc/languages-frameworks/texlive.section.md2
-rw-r--r--nixpkgs/doc/languages-frameworks/titanium.section.md8
-rw-r--r--nixpkgs/doc/languages-frameworks/vim.section.md20
24 files changed, 928 insertions, 266 deletions
diff --git a/nixpkgs/doc/languages-frameworks/agda.section.md b/nixpkgs/doc/languages-frameworks/agda.section.md
index 30a266502bf3..2b7c35f68d3b 100644
--- a/nixpkgs/doc/languages-frameworks/agda.section.md
+++ b/nixpkgs/doc/languages-frameworks/agda.section.md
@@ -1,17 +1,20 @@
 # Agda {#agda}
 
-## How to use Agda
+## How to use Agda {#how-to-use-agda}
 
-Agda can be installed from `agda`:
-```ShellSession
-$ nix-env -iA agda
-```
+Agda is available as the [agda](https://search.nixos.org/packages?channel=unstable&show=agda&from=0&size=30&sort=relevance&query=agda)
+package.
 
-To use Agda with libraries, the `agda.withPackages` function can be used. This function either takes:
+The `agda` package installs an Agda-wrapper, which calls `agda` with `--library-file`
+set to a generated library-file within the nix store, this means your library-file in
+`$HOME/.agda/libraries` will be ignored. By default the agda package installs Agda
+with no libraries, i.e. the generated library-file is empty. To use Agda with libraries,
+the `agda.withPackages` function can be used. This function either takes:
 
 * A list of packages,
 * or a function which returns a list of packages when given the `agdaPackages` attribute set,
 * or an attribute set containing a list of packages and a GHC derivation for compilation (see below).
+* or an attribute set containing a function which returns a list of packages when given the `agdaPackages` attribute set and a GHC derivation for compilation (see below).
 
 For example, suppose we wanted a version of Agda which has access to the standard library. This can be obtained with the expressions:
 
@@ -27,26 +30,86 @@ agda.withPackages (p: [ p.standard-library ])
 
 or can be called as in the [Compiling Agda](#compiling-agda) section.
 
-If you want to use a library in your home directory (for instance if it is a development version) then typecheck it manually (using `agda.withPackages` if necessary) and then override the `src` attribute of the package to point to your local repository.
+If you want to use a different version of a library (for instance a development version)
+override the `src` attribute of the package to point to your local repository
 
-Agda will not by default use these libraries. To tell Agda to use the library we have some options:
+```nix
+agda.withPackages (p: [
+  (p.standard-library.overrideAttrs (oldAttrs: {
+    version = "local version";
+    src = /path/to/local/repo/agda-stdlib;
+  }))
+])
+```
 
-* Call `agda` with the library flag:
-```ShellSession
-$ agda -l standard-library -i . MyFile.agda
+You can also reference a GitHub repository
+
+```nix
+agda.withPackages (p: [
+  (p.standard-library.overrideAttrs (oldAttrs: {
+    version = "1.5";
+    src =  fetchFromGitHub {
+      repo = "agda-stdlib";
+      owner = "agda";
+      rev = "v1.5";
+      sha256 = "16fcb7ssj6kj687a042afaa2gq48rc8abihpm14k684ncihb2k4w";
+    };
+  }))
+])
 ```
-* Write a `my-library.agda-lib` file for the project you are working on which may look like:
+
+If you want to use a library not added to Nixpkgs, you can add a
+dependency to a local library by calling `agdaPackages.mkDerivation`.
+
+```nix
+agda.withPackages (p: [
+  (p.mkDerivation {
+    pname = "your-agda-lib";
+    version = "1.0.0";
+    src = /path/to/your-agda-lib;
+  })
+])
 ```
-name: my-library
-include: .
-depend: standard-library
+
+Again you can reference GitHub
+
+```nix
+agda.withPackages (p: [
+  (p.mkDerivation {
+    pname = "your-agda-lib";
+    version = "1.0.0";
+    src = fetchFromGitHub {
+      repo = "repo";
+      owner = "owner";
+      version = "...";
+      rev = "...";
+      sha256 = "...";
+    };
+  })
+])
 ```
+
+See [Building Agda Packages](#building-agda-packages) for more information on `mkDerivation`.
+
+Agda will not by default use these libraries. To tell Agda to use a library we have some options:
+
+* Call `agda` with the library flag:
+  ```ShellSession
+  $ agda -l standard-library -i . MyFile.agda
+  ```
+* Write a `my-library.agda-lib` file for the project you are working on which may look like:
+  ```
+  name: my-library
+  include: .
+  depend: standard-library
+  ```
 * Create the file `~/.agda/defaults` and add any libraries you want to use by default.
 
 More information can be found in the [official Agda documentation on library management](https://agda.readthedocs.io/en/v2.6.1/tools/package-system.html).
 
-## Compiling Agda
-Agda modules can be compiled with the `--compile` flag. A version of `ghc` with `ieee754` is made available to the Agda program via the `--with-compiler` flag.
+## Compiling Agda {#compiling-agda}
+
+Agda modules can be compiled using the GHC backend with the `--compile` flag. A version of `ghc` with `ieee754` is made available to the Agda program via the `--with-compiler` flag.
 This can be overridden by a different version of `ghc` as follows:
 
 ```nix
@@ -56,7 +119,8 @@ agda.withPackages {
 }
 ```
 
-## Writing Agda packages
+## Writing Agda packages {#writing-agda-packages}
+
 To write a nix derivation for an Agda library, first check that the library has a `*.agda-lib` file.
 
 A derivation can then be written using `agdaPackages.mkDerivation`. This has similar arguments to `stdenv.mkDerivation` with the following additions:
@@ -65,25 +129,48 @@ A derivation can then be written using `agdaPackages.mkDerivation`. This has sim
 * `libraryName` should be the name that appears in the `*.agda-lib` file, defaulting to `pname`.
 * `libraryFile` should be the file name of the `*.agda-lib` file, defaulting to `${libraryName}.agda-lib`.
 
-### Building Agda packages
+Here is an example `default.nix`
+
+```nix
+{ nixpkgs ?  <nixpkgs> }:
+with (import nixpkgs {});
+agdaPackages.mkDerivation {
+  version = "1.0";
+  pname = "my-agda-lib";
+  src = ./.;
+  buildInputs = [
+    agdaPackages.standard-library
+  ];
+}
+```
+
+### Building Agda packages {#building-agda-packages}
+
 The default build phase for `agdaPackages.mkDerivation` simply runs `agda` on the `Everything.agda` file.
 If something else is needed to build the package (e.g. `make`) then the `buildPhase` should be overridden.
 Additionally, a `preBuild` or `configurePhase` can be used if there are steps that need to be done prior to checking the `Everything.agda` file.
 `agda` and the Agda libraries contained in `buildInputs` are made available during the build phase.
 
-### Installing Agda packages
+### Installing Agda packages {#installing-agda-packages}
+
 The default install phase copies Agda source files, Agda interface files (`*.agdai`) and `*.agda-lib` files to the output directory.
 This can be overridden.
 
 By default, Agda sources are files ending on `.agda`, or literate Agda files ending on `.lagda`, `.lagda.tex`, `.lagda.org`, `.lagda.md`, `.lagda.rst`. The list of recognised Agda source extensions can be extended by setting the `extraExtensions` config variable.
 
-## Adding Agda packages to Nixpkgs
+## Adding Agda packages to Nixpkgs {#adding-agda-packages-to-nixpkgs}
 
 To add an Agda package to `nixpkgs`, the derivation should be written to `pkgs/development/libraries/agda/${library-name}/` and an entry should be added to `pkgs/top-level/agda-packages.nix`. Here it is called in a scope with access to all other Agda libraries, so the top line of the `default.nix` can look like:
+
 ```nix
 { mkDerivation, standard-library, fetchFromGitHub }:
 ```
-and `mkDerivation` should be called instead of `agdaPackages.mkDerivation`. Here is an example skeleton derivation for iowa-stdlib:
+
+Note that the derivation function is called with `mkDerivation` set to `agdaPackages.mkDerivation`, therefore you
+could use a similar set as in your `default.nix` from [Writing Agda Packages](#writing-agda-packages) with
+`agdaPackages.mkDerivation` replaced with `mkDerivation`.
+
+Here is an example skeleton derivation for iowa-stdlib:
 
 ```nix
 mkDerivation {
@@ -101,6 +188,7 @@ mkDerivation {
   '';
 }
 ```
+
 This library has a file called `.agda-lib`, and so we give an empty string to `libraryFile` as nothing precedes `.agda-lib` in the filename. This file contains `name: IAL-1.3`, and so we let `libraryName =  "IAL-1.3"`. This library does not use an `Everything.agda` file and instead has a Makefile, so there is no need to set `everythingFile` and we set a custom `buildPhase`.
 
 When writing an Agda package it is essential to make sure that no `.agda-lib` file gets added to the store as a single file (for example by using `writeText`). This causes Agda to think that the nix store is a Agda library and it will attempt to write to it whenever it typechecks something. See [https://github.com/agda/agda/issues/4613](https://github.com/agda/agda/issues/4613).
diff --git a/nixpkgs/doc/languages-frameworks/android.section.md b/nixpkgs/doc/languages-frameworks/android.section.md
index e7dbbf6f8ec1..28128ead6631 100644
--- a/nixpkgs/doc/languages-frameworks/android.section.md
+++ b/nixpkgs/doc/languages-frameworks/android.section.md
@@ -3,8 +3,8 @@
 The Android build environment provides three major features and a number of
 supporting features.
 
-Deploying an Android SDK installation with plugins
---------------------------------------------------
+## Deploying an Android SDK installation with plugins {#deploying-an-android-sdk-installation-with-plugins}
+
 The first use case is deploying the SDK with a desired set of plugins or subsets
 of an SDK.
 
@@ -136,8 +136,8 @@ in
 androidComposition.platform-tools
 ```
 
-Using predefined Android package compositions
----------------------------------------------
+## Using predefined Android package compositions {#using-predefined-android-package-compositions}
+
 In addition to composing an Android package set manually, it is also possible
 to use a predefined composition that contains all basic packages for a specific
 Android version, such as version 9.0 (API-level 28).
@@ -159,12 +159,13 @@ with import <nixpkgs> {};
 androidenv.androidPkgs_9_0.platform-tools
 ```
 
-Building an Android application
--------------------------------
+## Building an Android application {#building-an-android-application}
+
 In addition to the SDK, it is also possible to build an Ant-based Android
 project and automatically deploy all the Android plugins that a project
 requires.
 
+
 ```nix
 with import <nixpkgs> {};
 
@@ -199,8 +200,8 @@ to build Android apps. An Android APK gets exposed as a build product and can be
 installed on any Android device with a web browser by navigating to the build
 result page.
 
-Spawning emulator instances
----------------------------
+## Spawning emulator instances {#spawning-emulator-instances}
+
 For testing purposes, it can also be quite convenient to automatically generate
 scripts that spawn emulator instances with all desired configuration settings.
 
@@ -241,8 +242,8 @@ androidenv.emulateApp {
 In addition to prebuilt APKs, you can also bind the APK parameter to a
 `buildApp {}` function invocation shown in the previous example.
 
-Notes on environment variables in Android projects
---------------------------------------------------
+## Notes on environment variables in Android projects {#notes-on-environment-variables-in-android-projects}
+
 * `ANDROID_SDK_ROOT` should point to the Android SDK. In your Nix expressions, this should be
   `${androidComposition.androidsdk}/libexec/android-sdk`. Note that `ANDROID_HOME` is deprecated,
   but if you rely on tools that need it, you can export it too.
@@ -300,8 +301,8 @@ This shell.nix includes a shell hook that overwrites local.properties with the c
 sdk.dir and ndk.dir values. This will ensure that the SDK and NDK directories will
 both be correct when you run Android Studio inside nix-shell.
 
-Notes on improving build.gradle compatibility
----------------------------------------------
+## Notes on improving build.gradle compatibility {#notes-on-improving-build.gradle-compatibility}
+
 Ensure that your buildToolsVersion and ndkVersion match what is declared in androidenv.
 If you are using cmake, make sure its declared version is correct too.
 
@@ -321,8 +322,8 @@ android {
 
 ```
 
-Querying the available versions of each plugin
-----------------------------------------------
+## Querying the available versions of each plugin {#querying-the-available-versions-of-each-plugin}
+
 repo.json provides all the options in one file now.
 
 A shell script in the `pkgs/development/mobile/androidenv/` subdirectory can be used to retrieve all
@@ -334,8 +335,8 @@ possible options:
 
 The above command-line instruction queries all package versions in repo.json.
 
-Updating the generated expressions
-----------------------------------
+## Updating the generated expressions {#updating-the-generated-expressions}
+
 repo.json is generated from XML files that the Android Studio package manager uses.
 To update the expressions run the `generate.sh` script that is stored in the
 `pkgs/development/mobile/androidenv/` subdirectory:
diff --git a/nixpkgs/doc/languages-frameworks/beam.section.md b/nixpkgs/doc/languages-frameworks/beam.section.md
index b5d39595c107..348f66d42791 100644
--- a/nixpkgs/doc/languages-frameworks/beam.section.md
+++ b/nixpkgs/doc/languages-frameworks/beam.section.md
@@ -4,13 +4,19 @@
 
 In this document and related Nix expressions, we use the term, _BEAM_, to describe the environment. BEAM is the name of the Erlang Virtual Machine and, as far as we're concerned, from a packaging perspective, all languages that run on the BEAM are interchangeable. That which varies, like the build system, is transparent to users of any given BEAM package, so we make no distinction.
 
+## Available versions and deprecations schedule {#available-versions-and-deprecations-schedule}
+
+### Elixir {#elixir}
+
+nixpkgs follows the [official elixir deprecation schedule](https://hexdocs.pm/elixir/compatibility-and-deprecations.html) and keeps the last 5 released versions of Elixir available.
+
 ## Structure {#beam-structure}
 
 All BEAM-related expressions are available via the top-level `beam` attribute, which includes:
 
-- `interpreters`: a set of compilers running on the BEAM, including multiple Erlang/OTP versions (`beam.interpreters.erlangR19`, etc), Elixir (`beam.interpreters.elixir`) and LFE (Lisp Flavoured Erlang) (`beam.interpreters.lfe`).
+- `interpreters`: a set of compilers running on the BEAM, including multiple Erlang/OTP versions (`beam.interpreters.erlangR22`, etc), Elixir (`beam.interpreters.elixir`) and LFE (Lisp Flavoured Erlang) (`beam.interpreters.lfe`).
 
-- `packages`: a set of package builders (Mix and rebar3), each compiled with a specific Erlang/OTP version, e.g. `beam.packages.erlangR19`.
+- `packages`: a set of package builders (Mix and rebar3), each compiled with a specific Erlang/OTP version, e.g. `beam.packages.erlang22`.
 
 The default Erlang compiler, defined by `beam.interpreters.erlang`, is aliased as `erlang`. The default BEAM package set is defined by `beam.packages.erlang` and aliased at the top level as `beamPackages`.
 
@@ -24,12 +30,18 @@ Many Erlang/OTP distributions available in `beam.interpreters` have versions wit
 
 We provide a version of Rebar3, under `rebar3`. We also provide a helper to fetch Rebar3 dependencies from a lockfile under `fetchRebar3Deps`.
 
+We also provide a version on Rebar3 with plugins included, under `rebar3WithPlugins`. This package is a function which takes two arguments: `plugins`, a list of nix derivations to include as plugins (loaded only when specified in `rebar.config`), and `globalPlugins`, which should always be loaded by rebar3. Example: `rebar3WithPlugins { globalPlugins = [beamPackages.pc]; }`.
+
+When adding a new plugin it is important that the `packageName` attribute is the same as the atom used by rebar3 to refer to the plugin.
+
 ### Mix & Erlang.mk {#build-tools-other}
 
 Erlang.mk works exactly as expected. There is a bootstrap process that needs to be run, which is supported by the `buildErlangMk` derivation.
 
 For Elixir applications use `mixRelease` to make a release. See examples for more details.
 
+There is also a `buildMix` helper, whose behavior is closer to that of `buildErlangMk` and `buildRebar3`. The primary difference is that mixRelease makes a release, while buildMix only builds the package, making it useful for libraries and other dependencies.
+
 ## How to Install BEAM Packages {#how-to-install-beam-packages}
 
 BEAM builders are not registered at the top level, simply because they are not relevant to the vast majority of Nix users. To install any of those builders into your profile, refer to them by their attribute path `beamPackages.rebar3`:
@@ -56,7 +68,7 @@ Erlang.mk functions similarly to Rebar3, except we use `buildErlangMk` instead o
 
 `mixRelease` is used to make a release in the mix sense. Dependencies will need to be fetched with `fetchMixDeps` and passed to it.
 
-#### mixRelease - Elixir Phoenix example
+#### mixRelease - Elixir Phoenix example {#mixrelease---elixir-phoenix-example}
 
 Here is how your `default.nix` file would look.
 
@@ -74,7 +86,7 @@ let
   version = "0.0.1";
   mixEnv = "prod";
 
-  mixDeps = packages.fetchMixDeps {
+  mixFodDeps = packages.fetchMixDeps {
     pname = "mix-deps-${pname}";
     inherit src mixEnv version;
     # nix will complain and tell you the right value to replace this with
@@ -118,7 +130,7 @@ let
 
 
 in packages.mixRelease {
-  inherit src pname version mixEnv mixDeps;
+  inherit src pname version mixEnv mixFodDeps;
   # if you have build time environment variables add them here
   MY_ENV_VAR="my_value";
   preInstall = ''
@@ -136,7 +148,7 @@ Setup will require the following steps:
 - you can now `nix-build .`
 - To run the release, set the `RELEASE_TMP` environment variable to a directory that your program has write access to. It will be used to store the BEAM settings.
 
-#### Example of creating a service for an Elixir - Phoenix project
+#### Example of creating a service for an Elixir - Phoenix project {#example-of-creating-a-service-for-an-elixir---phoenix-project}
 
 In order to create a service with your release, you could add a `service.nix`
 in your project with the following
@@ -216,7 +228,7 @@ mkShell {
 }
 ```
 
-#### Elixir - Phoenix project
+#### Elixir - Phoenix project {#elixir---phoenix-project}
 
 Here is an example `shell.nix`.
 
diff --git a/nixpkgs/doc/languages-frameworks/bower.section.md b/nixpkgs/doc/languages-frameworks/bower.section.md
index f408bd5b2c92..6226dc0702d7 100644
--- a/nixpkgs/doc/languages-frameworks/bower.section.md
+++ b/nixpkgs/doc/languages-frameworks/bower.section.md
@@ -149,7 +149,7 @@ A few notes about [Full example — `default.nix`](#ex-buildBowerComponentsDefau
 
 ## Troubleshooting {#ssec-bower2nix-troubleshooting}
 
-### ENOCACHE errors from buildBowerComponents
+### ENOCACHE errors from buildBowerComponents {#enocache-errors-from-buildbowercomponents}
 
 This means that Bower was looking for a package version which doesn't exist in the generated `bower-packages.nix`.
 
diff --git a/nixpkgs/doc/languages-frameworks/coq.section.md b/nixpkgs/doc/languages-frameworks/coq.section.md
index 5964d46e2f80..0674c5a4702e 100644
--- a/nixpkgs/doc/languages-frameworks/coq.section.md
+++ b/nixpkgs/doc/languages-frameworks/coq.section.md
@@ -1,6 +1,6 @@
 # Coq and coq packages {#sec-language-coq}
 
-## Coq derivation: `coq`
+## Coq derivation: `coq` {#coq-derivation-coq}
 
 The Coq derivation is overridable through the `coq.override overrides`, where overrides is an attribute set which contains the arguments to override. We recommend overriding either of the following
 
@@ -8,7 +8,7 @@ The Coq derivation is overridable through the `coq.override overrides`, where ov
 * `customOCamlPackage` (optional, defaults to `null`, which lets Coq choose a version automatically), which can be set to any of the ocaml packages attribute of `ocaml-ng` (such as `ocaml-ng.ocamlPackages_4_10` which is the default for Coq 8.11 for example).
 * `coq-version` (optional, defaults to the short version e.g. "8.10"), is a version number of the form "x.y" that indicates which Coq's version build behavior to mimic when using a source which is not a release. E.g. `coq.override { version = "d370a9d1328a4e1cdb9d02ee032f605a9d94ec7a"; coq-version = "8.10"; }`.
 
-## Coq packages attribute sets: `coqPackages`
+## Coq packages attribute sets: `coqPackages` {#coq-packages-attribute-sets-coqpackages}
 
 The recommended way of defining a derivation for a Coq library, is to use the `coqPackages.mkCoqDerivation` function, which is essentially a specialization of `mkDerivation` taking into account most of the specifics of Coq libraries. The following attributes are supported:
 
diff --git a/nixpkgs/doc/languages-frameworks/crystal.section.md b/nixpkgs/doc/languages-frameworks/crystal.section.md
index 74790132974a..cbe31f9f0b2f 100644
--- a/nixpkgs/doc/languages-frameworks/crystal.section.md
+++ b/nixpkgs/doc/languages-frameworks/crystal.section.md
@@ -1,10 +1,11 @@
 # Crystal {#crystal}
 
-## Building a Crystal package
+## Building a Crystal package {#building-a-crystal-package}
 
 This section uses [Mint](https://github.com/mint-lang/mint) as an example for how to build a Crystal package.
 
 If the Crystal project has any dependencies, the first step is to get a `shards.nix` file encoding those. Get a copy of the project and go to its root directory such that its `shard.lock` file is in the current directory, then run `crystal2nix` in it
+
 ```bash
 $ git clone https://github.com/mint-lang/mint
 $ cd mint
@@ -15,6 +16,7 @@ $ nix-shell -p crystal2nix --run crystal2nix
 This should have generated a `shards.nix` file.
 
 Next create a Nix file for your derivation and use `pkgs.crystal.buildCrystalPackage` as follows:
+
 ```nix
 with import <nixpkgs> {};
 crystal.buildCrystalPackage rec {
diff --git a/nixpkgs/doc/languages-frameworks/dhall.section.md b/nixpkgs/doc/languages-frameworks/dhall.section.md
new file mode 100644
index 000000000000..d1adcbf736bf
--- /dev/null
+++ b/nixpkgs/doc/languages-frameworks/dhall.section.md
@@ -0,0 +1,432 @@
+# Dhall {#sec-language-dhall}
+
+The Nixpkgs support for Dhall assumes some familiarity with Dhall's language
+support for importing Dhall expressions, which is documented here:
+
+* [`dhall-lang.org` - Installing packages](https://docs.dhall-lang.org/tutorials/Language-Tour.html#installing-packages)
+
+## Remote imports {#ssec-dhall-remote-imports}
+
+Nixpkgs bypasses Dhall's support for remote imports using Dhall's
+semantic integrity checks.  Specifically, any Dhall import can be protected by
+an integrity check like:
+
+```dhall
+https://prelude.dhall-lang.org/v20.1.0/package.dhall
+  sha256:26b0ef498663d269e4dc6a82b0ee289ec565d683ef4c00d0ebdd25333a5a3c98
+```
+
+… and if the import is cached then the interpreter will load the import from
+cache instead of fetching the URL.
+
+Nixpkgs uses this trick to add all of a Dhall expression's dependencies into the
+cache so that the Dhall interpreter never needs to resolve any remote URLs.  In
+fact, Nixpkgs uses a Dhall interpreter with remote imports disabled when
+packaging Dhall expressions to enforce that the interpreter never resolves a
+remote import.  This means that Nixpkgs only supports building Dhall expressions
+if all of their remote imports are protected by semantic integrity checks.
+
+Instead of remote imports, Nixpkgs uses Nix to fetch remote Dhall code.  For
+example, the Prelude Dhall package uses `pkgs.fetchFromGitHub` to fetch the
+`dhall-lang` repository containing the Prelude.  Relying exclusively on Nix
+to fetch Dhall code ensures that Dhall packages built using Nix remain pure and
+also behave well when built within a sandbox.
+
+## Packaging a Dhall expression from scratch {#ssec-dhall-packaging-expression}
+
+We can illustrate how Nixpkgs integrates Dhall by beginning from the following
+trivial Dhall expression with one dependency (the Prelude):
+
+```dhall
+-- ./true.dhall
+
+let Prelude = https://prelude.dhall-lang.org/v20.1.0/package.dhall
+
+in  Prelude.Bool.not False
+```
+
+As written, this expression cannot be built using Nixpkgs because the
+expression does not protect the Prelude import with a semantic integrity
+check, so the first step is to freeze the expression using `dhall freeze`,
+like this:
+
+```bash
+$ dhall freeze --inplace ./true.dhall
+```
+
+… which gives us:
+
+```dhall
+-- ./true.dhall
+
+let Prelude =
+      https://prelude.dhall-lang.org/v20.1.0/package.dhall
+        sha256:26b0ef498663d269e4dc6a82b0ee289ec565d683ef4c00d0ebdd25333a5a3c98
+
+in  Prelude.Bool.not False
+```
+
+To package that expression, we create a `./true.nix` file containing the
+following specification for the Dhall package:
+
+```nix
+# ./true.nix
+
+{ buildDhallPackage, Prelude }:
+
+buildDhallPackage {
+  name = "true";
+  code = ./true.dhall;
+  dependencies = [ Prelude ];
+  source = true;
+}
+```
+
+… and we complete the build by incorporating that Dhall package into the
+`pkgs.dhallPackages` hierarchy using an overlay, like this:
+
+```nix
+# ./example.nix
+
+let
+  nixpkgs = builtins.fetchTarball {
+    url    = "https://github.com/NixOS/nixpkgs/archive/94b2848559b12a8ed1fe433084686b2a81123c99.tar.gz";
+    sha256 = "1pbl4c2dsaz2lximgd31m96jwbps6apn3anx8cvvhk1gl9rkg107";
+  };
+
+  dhallOverlay = self: super: {
+    true = self.callPackage ./true.nix { };
+  };
+
+  overlay = self: super: {
+    dhallPackages = super.dhallPackages.override (old: {
+      overrides =
+        self.lib.composeExtensions (old.overrides or (_: _: {})) dhallOverlay;
+    });
+  };
+
+  pkgs = import nixpkgs { config = {}; overlays = [ overlay ]; };
+
+in
+  pkgs
+```
+
+… which we can then build using this command:
+
+```bash
+$ nix build --file ./example.nix dhallPackages.true
+```
+
+## Contents of a Dhall package {#ssec-dhall-package-contents}
+
+The above package produces the following directory tree:
+
+```bash
+$ tree -a ./result
+result
+├── .cache
+│   └── dhall
+│       └── 122027abdeddfe8503496adeb623466caa47da5f63abd2bc6fa19f6cfcb73ecfed70
+├── binary.dhall
+└── source.dhall
+```
+
+… where:
+
+* `source.dhall` contains the result of interpreting our Dhall package:
+
+  ```bash
+  $ cat ./result/source.dhall
+  True
+  ```
+
+* The `.cache` subdirectory contains one binary cache product encoding the
+  same result as `source.dhall`:
+
+  ```bash
+  $ dhall decode < ./result/.cache/dhall/122027abdeddfe8503496adeb623466caa47da5f63abd2bc6fa19f6cfcb73ecfed70
+  True
+  ```
+
+* `binary.dhall` contains a Dhall expression which handles fetching and decoding
+  the same cache product:
+
+  ```bash
+  $ cat ./result/binary.dhall
+  missing sha256:27abdeddfe8503496adeb623466caa47da5f63abd2bc6fa19f6cfcb73ecfed70
+  $ cp -r ./result/.cache .cache
+
+  $ chmod -R u+w .cache
+
+  $ XDG_CACHE_HOME=.cache dhall --file ./result/binary.dhall
+  True
+  ```
+
+The `source.dhall` file is only present for packages that specify
+`source = true;`.  By default, Dhall packages omit the `source.dhall` in order
+to conserve disk space when they are used exclusively as dependencies.  For
+example, if we build the Prelude package it will only contain the binary
+encoding of the expression:
+
+```bash
+$ nix build --file ./example.nix dhallPackages.Prelude
+
+$ tree -a result
+result
+├── .cache
+│   └── dhall
+│       └── 122026b0ef498663d269e4dc6a82b0ee289ec565d683ef4c00d0ebdd25333a5a3c98
+└── binary.dhall
+
+2 directories, 2 files
+```
+
+Typically, you only specify `source = true;` for the top-level Dhall expression
+of interest (such as our example `true.nix` Dhall package).  However, if you
+wish to specify `source = true` for all Dhall packages, then you can amend the
+Dhall overlay like this:
+
+```nix
+  dhallOverrides = self: super: {
+    # Enable source for all Dhall packages
+    buildDhallPackage =
+      args: super.buildDhallPackage (args // { source = true; });
+
+    true = self.callPackage ./true.nix { };
+  };
+```
+
+… and now the Prelude will contain the fully decoded result of interpreting
+the Prelude:
+
+```bash
+$ nix build --file ./example.nix dhallPackages.Prelude
+
+$ tree -a result
+result
+├── .cache
+│   └── dhall
+│       └── 122026b0ef498663d269e4dc6a82b0ee289ec565d683ef4c00d0ebdd25333a5a3c98
+├── binary.dhall
+└── source.dhall
+
+$ cat ./result/source.dhall
+{ Bool =
+  { and =
+      \(_ : List Bool) ->
+        List/fold Bool _ Bool (\(_ : Bool) -> \(_ : Bool) -> _@1 && _) True
+  , build = \(_ : Type -> _ -> _@1 -> _@2) -> _ Bool True False
+  , even =
+      \(_ : List Bool) ->
+        List/fold Bool _ Bool (\(_ : Bool) -> \(_ : Bool) -> _@1 == _) True
+  , fold =
+      \(_ : Bool) ->
+…
+```
+
+## Packaging functions {#ssec-dhall-packaging-functions}
+
+We already saw an example of using `buildDhallPackage` to create a Dhall
+package from a single file, but most Dhall packages consist of more than one
+file and there are two derived utilities that you may find more useful when
+packaging multiple files:
+
+* `buildDhallDirectoryPackage` - build a Dhall package from a local directory
+
+* `buildDhallGitHubPackage` - build a Dhall package from a GitHub repository
+
+The `buildDhallPackage` is the lowest-level function and accepts the following
+arguments:
+
+* `name`: The name of the derivation
+
+* `dependencies`: Dhall dependencies to build and cache ahead of time
+
+* `code`: The top-level expression to build for this package
+
+  Note that the `code` field accepts an arbitrary Dhall expression.  You're
+  not limited to just a file.
+
+* `source`: Set to `true` to include the decoded result as `source.dhall` in the
+  build product, at the expense of requiring more disk space
+
+* `documentationRoot`: Set to the root directory of the package if you want
+  `dhall-docs` to generate documentation underneath the `docs` subdirectory of
+  the build product
+
+The `buildDhallDirectoryPackage` is a higher-level function implemented in terms
+of `buildDhallPackage` that accepts the following arguments:
+
+* `name`: Same as `buildDhallPackage`
+
+* `dependencies`: Same as `buildDhallPackage`
+
+* `source`: Same as `buildDhallPackage`
+
+* `src`: The directory containing Dhall code that you want to turn into a Dhall
+  package
+
+* `file`: The top-level file (`package.dhall` by default) that is the entrypoint
+  to the rest of the package
+
+* `document`: Set to `true` to generate documentation for the package
+
+The `buildDhallGitHubPackage` is another higher-level function implemented in
+terms of `buildDhallPackage` that accepts the following arguments:
+
+* `name`: Same as `buildDhallPackage`
+
+* `dependencies`: Same as `buildDhallPackage`
+
+* `source`: Same as `buildDhallPackage`
+
+* `owner`: The owner of the repository
+
+* `repo`: The repository name
+
+* `rev`: The desired revision (or branch, or tag)
+
+* `directory`: The subdirectory of the Git repository to package (if a
+  directory other than the root of the repository)
+
+* `file`: The top-level file (`${directory}/package.dhall` by default) that is
+  the entrypoint to the rest of the package
+
+* `document`: Set to `true` to generate documentation for the package
+
+Additionally, `buildDhallGitHubPackage` accepts the same arguments as
+`fetchFromGitHub`, such as `sha256` or `fetchSubmodules`.
+
+## `dhall-to-nixpkgs` {#ssec-dhall-dhall-to-nixpkgs}
+
+You can use the `dhall-to-nixpkgs` command-line utility to automate
+packaging Dhall code.  For example:
+
+```bash
+$ nix-env --install --attr haskellPackages.dhall-nixpkgs
+
+$ nix-env --install --attr nix-prefetch-git  # Used by dhall-to-nixpkgs
+
+$ dhall-to-nixpkgs github https://github.com/Gabriel439/dhall-semver.git
+{ buildDhallGitHubPackage, Prelude }:
+  buildDhallGitHubPackage {
+    name = "dhall-semver";
+    githubBase = "github.com";
+    owner = "Gabriel439";
+    repo = "dhall-semver";
+    rev = "2d44ae605302ce5dc6c657a1216887fbb96392a4";
+    fetchSubmodules = false;
+    sha256 = "0y8shvp8srzbjjpmnsvz9c12ciihnx1szs0yzyi9ashmrjvd0jcz";
+    directory = "";
+    file = "package.dhall";
+    source = false;
+    document = false;
+    dependencies = [ (Prelude.overridePackage { file = "package.dhall"; }) ];
+    }
+```
+
+The utility takes care of automatically detecting remote imports and converting
+them to package dependencies.  You can also use the utility on local
+Dhall directories, too:
+
+```bash
+$ dhall-to-nixpkgs directory ~/proj/dhall-semver
+{ buildDhallDirectoryPackage, Prelude }:
+  buildDhallDirectoryPackage {
+    name = "proj";
+    src = /Users/gabriel/proj/dhall-semver;
+    file = "package.dhall";
+    source = false;
+    document = false;
+    dependencies = [ (Prelude.overridePackage { file = "package.dhall"; }) ];
+    }
+```
+
+## Overriding dependency versions {#ssec-dhall-overriding-dependency-versions}
+
+Suppose that we change our `true.dhall` example expression to depend on an older
+version of the Prelude (19.0.0):
+
+```dhall
+-- ./true.dhall
+
+let Prelude =
+      https://prelude.dhall-lang.org/v19.0.0/package.dhall
+        sha256:eb693342eb769f782174157eba9b5924cf8ac6793897fc36a31ccbd6f56dafe2
+
+in  Prelude.Bool.not False
+```
+
+If we try to rebuild that expression the build will fail:
+
+```
+$ nix build --file ./example.nix dhallPackages.true
+builder for '/nix/store/0f1hla7ff1wiaqyk1r2ky4wnhnw114fi-true.drv' failed with exit code 1; last 10 log lines:
+
+  Dhall was compiled without the 'with-http' flag.
+
+  The requested URL was: https://prelude.dhall-lang.org/v19.0.0/package.dhall
+
+
+  4│       https://prelude.dhall-lang.org/v19.0.0/package.dhall
+  5│         sha256:eb693342eb769f782174157eba9b5924cf8ac6793897fc36a31ccbd6f56dafe2
+
+  /nix/store/rsab4y99h14912h4zplqx2iizr5n4rc2-true.dhall:4:7
+[1 built (1 failed), 0.0 MiB DL]
+error: build of '/nix/store/0f1hla7ff1wiaqyk1r2ky4wnhnw114fi-true.drv' failed
+```
+
+… because the default Prelude selected by Nixpkgs revision
+`94b2848559b12a8ed1fe433084686b2a81123c99is` is version 20.1.0, which doesn't
+have the same integrity check as version 19.0.0.  This means that version
+19.0.0 is not cached and the interpreter is not allowed to fall back to
+importing the URL.
+
+However, we can override the default Prelude version by using `dhall-to-nixpkgs`
+to create a Dhall package for our desired Prelude:
+
+```bash
+$ dhall-to-nixpkgs github https://github.com/dhall-lang/dhall-lang.git \
+    --name Prelude \
+    --directory Prelude \
+    --rev v19.0.0 \
+    > Prelude.nix
+```
+
+… and then referencing that package in our Dhall overlay, by either overriding
+the Prelude globally for all packages, like this:
+
+```bash
+  dhallOverrides = self: super: {
+    true = self.callPackage ./true.nix { };
+
+    Prelude = self.callPackage ./Prelude.nix { };
+  };
+```
+
+… or selectively overriding the Prelude dependency for just the `true` package,
+like this:
+
+```bash
+  dhallOverrides = self: super: {
+    true = self.callPackage ./true.nix {
+      Prelude = self.callPackage ./Prelude.nix { };
+    };
+  };
+```
+
+## Overrides {#ssec-dhall-overrides}
+
+You can override any of the arguments to `buildDhallGitHubPackage` or
+`buildDhallDirectoryPackage` using the `overridePackage` attribute of a package.
+For example, suppose we wanted to selectively enable `source = true` just for the Prelude.  We can do that like this:
+
+```nix
+  dhallOverrides = self: super: {
+    Prelude = super.Prelude.overridePackage { source = true; };
+
+    …
+  };
+```
+
+[semantic-integrity-checks]: https://docs.dhall-lang.org/tutorials/Language-Tour.html#installing-packages
diff --git a/nixpkgs/doc/languages-frameworks/dotnet.section.md b/nixpkgs/doc/languages-frameworks/dotnet.section.md
index 36369fd4e634..1bcb6e45210e 100644
--- a/nixpkgs/doc/languages-frameworks/dotnet.section.md
+++ b/nixpkgs/doc/languages-frameworks/dotnet.section.md
@@ -1,6 +1,6 @@
-# Dotnet
+# Dotnet {#dotnet}
 
-## Local Development Workflow
+## Local Development Workflow {#local-development-workflow}
 
 For local development, it's recommended to use nix-shell to create a dotnet environment:
 
@@ -10,13 +10,13 @@ with import <nixpkgs> {};
 
 mkShell {
   name = "dotnet-env";
-  buildInputs = [
+  packages = [
     dotnet-sdk_3
   ];
 }
 ```
 
-### Using many sdks in a workflow
+### Using many sdks in a workflow {#using-many-sdks-in-a-workflow}
 
 It's very likely that more than one sdk will be needed on a given project. Dotnet provides several different frameworks (E.g dotnetcore, aspnetcore, etc.) as well as many versions for a given framework. Normally, dotnet is able to fetch a framework and install it relative to the executable. However, this would mean writing to the nix store in nixpkgs, which is read-only. To support the many-sdk use case, one can compose an environment using `dotnetCorePackages.combinePackages`:
 
@@ -25,7 +25,7 @@ with import <nixpkgs> {};
 
 mkShell {
   name = "dotnet-env";
-  buildInputs = [
+  packages = [
     (with dotnetCorePackages; combinePackages [
       sdk_3_1
       sdk_3_0
@@ -37,7 +37,7 @@ mkShell {
 
 This will produce a dotnet installation that has the dotnet 3.1, 3.0, and 2.1 sdk. The first sdk listed will have it's cli utility present in the resulting environment. Example info output:
 
-```ShellSesssion
+```ShellSession
 $ dotnet --info
 .NET Core SDK (reflecting any global.json):
  Version:   3.1.101
@@ -60,15 +60,15 @@ $ dotnet --info
   Microsoft.NETCore.App 3.1.1 [/nix/store/iiv98i2jdi226dgh4jzkkj2ww7f8jgpd-dotnet-core-combined/shared/Microsoft.NETCore.App]
 ```
 
-## dotnet-sdk vs dotnetCorePackages.sdk
+## dotnet-sdk vs dotnetCorePackages.sdk {#dotnet-sdk-vs-dotnetcorepackages.sdk}
 
 The `dotnetCorePackages.sdk_X_Y` is preferred over the old dotnet-sdk as both major and minor version are very important for a dotnet environment. If a given minor version isn't present (or was changed), then this will likely break your ability to build a project.
 
-## dotnetCorePackages.sdk vs dotnetCorePackages.net vs dotnetCorePackages.netcore vs dotnetCorePackages.aspnetcore
+## dotnetCorePackages.sdk vs dotnetCorePackages.net vs dotnetCorePackages.netcore vs dotnetCorePackages.aspnetcore {#dotnetcorepackages.sdk-vs-dotnetcorepackages.net-vs-dotnetcorepackages.netcore-vs-dotnetcorepackages.aspnetcore}
 
 The `dotnetCorePackages.sdk` contains both a runtime and the full sdk of a given version. The `net`, `netcore` and `aspnetcore` packages are meant to serve as minimal runtimes to deploy alongside already built applications. For runtime versions >= .NET 5 `net` is used while `netcore` is used for older .NET Core runtime version.
 
-## Packaging a Dotnet Application
+## Packaging a Dotnet Application {#packaging-a-dotnet-application}
 
 Ideally, we would like to build against the sdk, then only have the dotnet runtime available in the runtime closure.
 
diff --git a/nixpkgs/doc/languages-frameworks/emscripten.section.md b/nixpkgs/doc/languages-frameworks/emscripten.section.md
index d391e038070d..b3ddf0cedaea 100644
--- a/nixpkgs/doc/languages-frameworks/emscripten.section.md
+++ b/nixpkgs/doc/languages-frameworks/emscripten.section.md
@@ -27,16 +27,14 @@ Modes of use of `emscripten`:
     * dev-shell for zlib implementation hacking:
         * `nix-shell -A emscriptenPackages.zlib`
 
-
-## Imperative usage
+## Imperative usage {#imperative-usage}
 
 A few things to note:
 
 * `export EMCC_DEBUG=2` is nice for debugging
 * `~/.emscripten`, the build artifact cache sometimes creates issues and needs to be removed from time to time
 
-
-## Declarative usage
+## Declarative usage {#declarative-usage}
 
 Let's see two different examples from `pkgs/top-level/emscripten-packages.nix`:
 
@@ -50,7 +48,7 @@ A special requirement of the `pkgs.buildEmscriptenPackage` is the `doCheck = tru
 * Use `export EMCC_DEBUG=2` from within a emscriptenPackage's `phase` to get more detailed debug output what is going wrong.
 * ~/.emscripten cache is requiring us to set `HOME=$TMPDIR` in individual phases. This makes compilation slower but also makes it more deterministic.
 
-### Usage 1: pkgs.zlib.override
+### Usage 1: pkgs.zlib.override {#usage-1-pkgs.zlib.override}
 
 This example uses `zlib` from nixpkgs but instead of compiling **C** to **ELF** it compiles **C** to **JS** since we were using `pkgs.zlib.override` and changed stdenv to `pkgs.emscriptenStdenv`. A few adaptions and hacks were set in place to make it working. One advantage is that when `pkgs.zlib` is updated, it will automatically update this package as well. However, this can also be the downside...
 
@@ -110,7 +108,7 @@ See the `zlib` example:
       '';
     });
 
-### Usage 2: pkgs.buildEmscriptenPackage
+### Usage 2: pkgs.buildEmscriptenPackage {#usage-2-pkgs.buildemscriptenpackage}
 
 This `xmlmirror` example features a emscriptenPackage which is defined completely from this context and no `pkgs.zlib.override` is used.
 
@@ -165,7 +163,7 @@ This `xmlmirror` example features a emscriptenPackage which is defined completel
       '';
     };
 
-### Declarative debugging
+### Declarative debugging {#declarative-debugging}
 
 Use `nix-shell -I nixpkgs=/some/dir/nixpkgs -A emscriptenPackages.libz` and from there you can go trough the individual steps. This makes it easy to build a good `unit test` or list the files of the project.
 
@@ -177,7 +175,7 @@ Use `nix-shell -I nixpkgs=/some/dir/nixpkgs -A emscriptenPackages.libz` and from
 6. `buildPhase`
 7. ... happy hacking...
 
-## Summary
+## Summary {#summary}
 
 Using this toolchain makes it easy to leverage `nix` from NixOS, MacOSX or even Windows (WSL+ubuntu+nix). This toolchain is reproducible, behaves like the rest of the packages from nixpkgs and contains a set of well working examples to learn and adapt from.
 
diff --git a/nixpkgs/doc/languages-frameworks/gnome.section.md b/nixpkgs/doc/languages-frameworks/gnome.section.md
index 00bd524b0c50..a1121efe3f07 100644
--- a/nixpkgs/doc/languages-frameworks/gnome.section.md
+++ b/nixpkgs/doc/languages-frameworks/gnome.section.md
@@ -68,7 +68,7 @@ preFixup = ''
 
 Fortunately, there is [`wrapGAppsHook`]{#ssec-gnome-hooks-wrapgappshook}. It works in conjunction with other setup hooks that populate environment variables, and it will then wrap all executables in `bin` and `libexec` directories using said variables.
 
-For convenience, it also adds `dconf.lib` for a GIO module implementing a GSettings backend using `dconf`, `gtk3` for GSettings schemas, and `librsvg` for GdkPixbuf loader to the closure. In case you are packaging a program without a graphical interface, you might want to use [`wrapGAppsNoGuiHook`]{#ssec-gnome-hooks-wrapgappsnoguihook}, which runs the same script as `wrapGAppsHook` but does not bring `gtk3` and `librsvg` into the closure.
+For convenience, it also adds `dconf.lib` for a GIO module implementing a GSettings backend using `dconf`, `gtk3` for GSettings schemas, and `librsvg` for GdkPixbuf loader to the closure. There is also [`wrapGAppsHook4`]{#ssec-gnome-hooks-wrapgappshook4}, which replaces GTK 3 with GTK 4. And in case you are packaging a program without a graphical interface, you might want to use [`wrapGAppsNoGuiHook`]{#ssec-gnome-hooks-wrapgappsnoguihook}, which runs the same script as `wrapGAppsHook` but does not bring `gtk3` and `librsvg` into the closure.
 
 - `wrapGAppsHook` itself will add the package’s `share` directory to `XDG_DATA_DIRS`.
 
@@ -84,11 +84,11 @@ For convenience, it also adds `dconf.lib` for a GIO module implementing a GSetti
 
 - []{#ssec-gnome-hooks-gobject-introspection} `gobject-introspection` setup hook populates `GI_TYPELIB_PATH` variable with `lib/girepository-1.0` directories of dependencies, which is then added to wrapper by `wrapGAppsHook`. It also adds `share` directories of dependencies to `XDG_DATA_DIRS`, which is intended to promote GIR files but it also [pollutes the closures](https://github.com/NixOS/nixpkgs/issues/32790) of packages using `wrapGAppsHook`.
 
-  ::: warning
+  ::: {.warning}
   The setup hook [currently](https://github.com/NixOS/nixpkgs/issues/56943) does not work in expressions with `strictDeps` enabled, like Python packages. In those cases, you will need to disable it with `strictDeps = false;`.
   :::
 
-- []{#ssec-gnome-hooks-gst-grl-plugins} Setup hooks of `gst_all_1.gstreamer` and `gnome3.grilo` will populate the `GST_PLUGIN_SYSTEM_PATH_1_0` and `GRL_PLUGIN_PATH` variables, respectively, which will then be added to the wrapper by `wrapGAppsHook`.
+- []{#ssec-gnome-hooks-gst-grl-plugins} Setup hooks of `gst_all_1.gstreamer` and `grilo` will populate the `GST_PLUGIN_SYSTEM_PATH_1_0` and `GRL_PLUGIN_PATH` variables, respectively, which will then be added to the wrapper by `wrapGAppsHook`.
 
 You can also pass additional arguments to `makeWrapper` using `gappsWrapperArgs` in `preFixup` hook:
 
@@ -105,7 +105,7 @@ preFixup = ''
 
 ## Updating GNOME packages {#ssec-gnome-updating}
 
-Most GNOME package offer [`updateScript`](#var-passthru-updateScript), it is therefore possible to update to latest source tarball by running `nix-shell maintainers/scripts/update.nix --argstr package gnome3.nautilus` or even en masse with `nix-shell maintainers/scripts/update.nix --argstr path gnome3`. Read the package’s `NEWS` file to see what changed.
+Most GNOME package offer [`updateScript`](#var-passthru-updateScript), it is therefore possible to update to latest source tarball by running `nix-shell maintainers/scripts/update.nix --argstr package gnome.nautilus` or even en masse with `nix-shell maintainers/scripts/update.nix --argstr path gnome`. Read the package’s `NEWS` file to see what changed.
 
 ## Frequently encountered issues {#ssec-gnome-common-issues}
 
diff --git a/nixpkgs/doc/languages-frameworks/go.section.md b/nixpkgs/doc/languages-frameworks/go.section.md
index b4228d9d313d..b20a8d0c3549 100644
--- a/nixpkgs/doc/languages-frameworks/go.section.md
+++ b/nixpkgs/doc/languages-frameworks/go.section.md
@@ -44,7 +44,7 @@ pet = buildGoModule rec {
 
 The function `buildGoPackage` builds legacy Go programs, not supporting Go modules.
 
-### Example for `buildGoPackage`
+### Example for `buildGoPackage` {#example-for-buildgopackage}
 
 In the following is an example expression using buildGoPackage, the following arguments are of special significance to the function:
 
@@ -114,21 +114,24 @@ Both `buildGoModule` and `buildGoPackage` can be tweaked to behave slightly diff
 
 ### `buildFlagsArray` and `buildFlags`: {#ex-goBuildFlags-noarray}
 
-These attributes set build flags supported by `go build`. We recommend using `buildFlagsArray`. The most common use case of these attributes is to make the resulting executable aware of its own version. For example:
+These attributes set build flags supported by `go build`. We recommend using `buildFlagsArray`.
 
 ```nix
   buildFlagsArray = [
-    # Note: single quotes are not needed.
-    "-ldflags=-X main.Version=${version} -X main.Commit=${version}"
+    "-tags=release"
   ];
 ```
 
+### `ldflags` {#var-go-ldflags}
+
+Arguments to pass to the Go linker tool via the `-ldflags` argument of `go build`. The most common use case for this argument is to make the resulting executable aware of its own version. For example:
+
 ```nix
-  buildFlagsArray = ''
-    -ldflags=
-    -X main.Version=${version}
-    -X main.Commit=${version}
-  '';
+  ldflags = [
+    "-s" "-w"
+    "-X main.Version=${version}"
+    "-X main.Commit=${version}"
+  ];
 ```
 
 ### `deleteVendor` {#var-go-deleteVendor}
@@ -137,4 +140,4 @@ Removes the pre-existing vendor directory. This should only be used if the depen
 
 ### `subPackages` {#var-go-subPackages}
 
-Limits the builder from building child packages that have not been listed. If <varname>subPackages</varname> is not specified, all child packages will be built.
+Limits the builder from building child packages that have not been listed. If `subPackages` is not specified, all child packages will be built.
diff --git a/nixpkgs/doc/languages-frameworks/idris.section.md b/nixpkgs/doc/languages-frameworks/idris.section.md
index 000e3627d70d..ffdd706eb0b7 100644
--- a/nixpkgs/doc/languages-frameworks/idris.section.md
+++ b/nixpkgs/doc/languages-frameworks/idris.section.md
@@ -1,10 +1,10 @@
 # Idris {#idris}
 
-## Installing Idris
+## Installing Idris {#installing-idris}
 
 The easiest way to get a working idris version is to install the `idris` attribute:
 
-```ShellSesssion
+```ShellSession
 $ # On NixOS
 $ nix-env -i nixos.idris
 $ # On non-NixOS
@@ -21,7 +21,7 @@ self: super: {
 
 And then:
 
-```ShellSesssion
+```ShellSession
 $ # On NixOS
 $ nix-env -iA nixos.myIdris
 $ # On non-NixOS
@@ -29,7 +29,8 @@ $ nix-env -iA nixpkgs.myIdris
 ```
 
 To see all available Idris packages:
-```ShellSesssion
+
+```ShellSession
 $ # On NixOS
 $ nix-env -qaPA nixos.idrisPackages
 $ # On non-NixOS
@@ -37,22 +38,23 @@ $ nix-env -qaPA nixpkgs.idrisPackages
 ```
 
 Similarly, entering a `nix-shell`:
-```ShellSesssion
+
+```ShellSession
 $ nix-shell -p 'idrisPackages.with-packages (with idrisPackages; [ contrib pruviloj ])'
 ```
 
-## Starting Idris with library support
+## Starting Idris with library support {#starting-idris-with-library-support}
 
 To have access to these libraries in idris, call it with an argument `-p <library name>` for each library:
 
-```ShellSesssion
+```ShellSession
 $ nix-shell -p 'idrisPackages.with-packages (with idrisPackages; [ contrib pruviloj ])'
 [nix-shell:~]$ idris -p contrib -p pruviloj
 ```
 
 A listing of all available packages the Idris binary has access to is available via `--listlibs`:
 
-```ShellSesssion
+```ShellSession
 $ idris --listlibs
 00prelude-idx.ibc
 pruviloj
@@ -64,7 +66,7 @@ prelude
 00contrib-idx.ibc
 ```
 
-## Building an Idris project with Nix
+## Building an Idris project with Nix {#building-an-idris-project-with-nix}
 
 As an example of how a Nix expression for an Idris package can be created, here is the one for `idrisPackages.yaml`:
 
@@ -105,7 +107,7 @@ build-idris-package  {
 
 Assuming this file is saved as `yaml.nix`, it's buildable using
 
-```ShellSesssion
+```ShellSession
 $ nix-build -E '(import <nixpkgs> {}).idrisPackages.callPackage ./yaml.nix {}'
 ```
 
@@ -121,11 +123,11 @@ with import <nixpkgs> {};
 
 in another file (say `default.nix`) to be able to build it with
 
-```ShellSesssion
+```ShellSession
 $ nix-build -A yaml
 ```
 
-## Passing options to `idris` commands
+## Passing options to `idris` commands {#passing-options-to-idris-commands}
 
 The `build-idris-package` function provides also optional input values to set additional options for the used `idris` commands.
 
diff --git a/nixpkgs/doc/languages-frameworks/index.xml b/nixpkgs/doc/languages-frameworks/index.xml
index 4d07d2b524d7..791afce6f5c6 100644
--- a/nixpkgs/doc/languages-frameworks/index.xml
+++ b/nixpkgs/doc/languages-frameworks/index.xml
@@ -11,6 +11,7 @@
  <xi:include href="bower.section.xml" />
  <xi:include href="coq.section.xml" />
  <xi:include href="crystal.section.xml" />
+ <xi:include href="dhall.section.xml" />
  <xi:include href="emscripten.section.xml" />
  <xi:include href="gnome.section.xml" />
  <xi:include href="go.section.xml" />
diff --git a/nixpkgs/doc/languages-frameworks/ios.section.md b/nixpkgs/doc/languages-frameworks/ios.section.md
index a162e8d19fd3..04b013be12e2 100644
--- a/nixpkgs/doc/languages-frameworks/ios.section.md
+++ b/nixpkgs/doc/languages-frameworks/ios.section.md
@@ -20,8 +20,8 @@ Hydra.
 
 The Xcode build environment implements a number of features.
 
-Deploying a proxy component wrapper exposing Xcode
---------------------------------------------------
+## Deploying a proxy component wrapper exposing Xcode {#deploying-a-proxy-component-wrapper-exposing-xcode}
+
 The first use case is deploying a Nix package that provides symlinks to the Xcode
 installation on the host system. This package can be used as a build input to
 any build function implemented in the Nix expression language that requires
@@ -55,8 +55,8 @@ lrwxr-xr-x  1 sander  staff  61  1 jan  1970 xcodebuild -> /Applications/Xcode.a
 lrwxr-xr-x  1 sander  staff  14  1 jan  1970 xcrun -> /usr/bin/xcrun
 ```
 
-Building an iOS application
----------------------------
+## Building an iOS application {#building-an-ios-application}
+
 We can build an iOS app executable for the simulator, or an IPA/xcarchive file
 for release purposes, e.g. ad-hoc, enterprise or store installations, by
 executing the `xcodeenv.buildApp {}` function:
@@ -99,6 +99,7 @@ xcodeenv.buildApp {
 ```
 
 The above function takes a variety of parameters:
+
 * The `name` and `src` parameters are mandatory and specify the name of the app
   and the location where the source code resides
 * `sdkVersion` specifies which version of the iOS SDK to use.
@@ -151,8 +152,8 @@ the `xcodeenv.composeXcodeWrapper {}` function takes. For example, the
 `xcodeBaseDir` parameter can be overridden to refer to a different Xcode
 version.
 
-Spawning simulator instances
-----------------------------
+## Spawning simulator instances {#spawning-simulator-instances}
+
 In addition to building iOS apps, we can also automatically spawn simulator
 instances:
 
@@ -213,8 +214,8 @@ xcode.simulateApp {
 By providing the result of an `xcode.buildApp {}` function and configuring the
 app bundle id, the app gets deployed automatically and started.
 
-Troubleshooting
----------------
+## Troubleshooting {#troubleshooting}
+
 In some rare cases, it may happen that after a failure, changes are not picked
 up. Most likely, this is caused by a derived data cache that Xcode maintains.
 To wipe it you can run:
diff --git a/nixpkgs/doc/languages-frameworks/lua.section.md b/nixpkgs/doc/languages-frameworks/lua.section.md
index 5935cbd7bd52..ea893ce3a4a7 100644
--- a/nixpkgs/doc/languages-frameworks/lua.section.md
+++ b/nixpkgs/doc/languages-frameworks/lua.section.md
@@ -1,8 +1,8 @@
-# User's Guide to Lua Infrastructure {#users-guide-to-lua-infrastructure}
+# User’s Guide to Lua Infrastructure {#users-guide-to-lua-infrastructure}
 
-## Using Lua
+## Using Lua {#using-lua}
 
-### Overview of Lua
+### Overview of Lua {#overview-of-lua}
 
 Several versions of the Lua interpreter are available: luajit, lua 5.1, 5.2, 5.3.
 The attribute `lua` refers to the default interpreter, it is also possible to refer to specific versions, e.g. `lua5_2` refers to Lua 5.2.
@@ -17,27 +17,31 @@ The main package set contains aliases to these package sets, e.g.
 `luaPackages` refers to `lua5_1.pkgs` and `lua52Packages` to
 `lua5_2.pkgs`.
 
-### Installing Lua and packages
+### Installing Lua and packages {#installing-lua-and-packages}
 
-#### Lua environment defined in separate `.nix` file
+#### Lua environment defined in separate `.nix` file {#lua-environment-defined-in-separate-.nix-file}
 
 Create a file, e.g. `build.nix`, with the following expression
+
 ```nix
 with import <nixpkgs> {};
 
 lua5_2.withPackages (ps: with ps; [ busted luafilesystem ])
 ```
+
 and install it in your profile with
+
 ```shell
 nix-env -if build.nix
 ```
 Now you can use the Lua interpreter, as well as the extra packages (`busted`,
 `luafilesystem`) that you added to the environment.
 
-#### Lua environment defined in `~/.config/nixpkgs/config.nix`
+#### Lua environment defined in `~/.config/nixpkgs/config.nix` {#lua-environment-defined-in-.confignixpkgsconfig.nix}
 
 If you prefer to, you could also add the environment as a package override to the Nixpkgs set, e.g.
 using `config.nix`,
+
 ```nix
 { # ...
 
@@ -46,14 +50,16 @@ using `config.nix`,
   };
 }
 ```
+
 and install it in your profile with
+
 ```shell
 nix-env -iA nixpkgs.myLuaEnv
 ```
 The environment is installed by referring to the attribute, and considering
 the `nixpkgs` channel was used.
 
-#### Lua environment defined in `/etc/nixos/configuration.nix`
+#### Lua environment defined in `/etc/nixos/configuration.nix` {#lua-environment-defined-in-etcnixosconfiguration.nix}
 
 For the sake of completeness, here's another example how to install the environment system-wide.
 
@@ -66,7 +72,7 @@ For the sake of completeness, here's another example how to install the environm
 }
 ```
 
-### How to override a Lua package using overlays?
+### How to override a Lua package using overlays? {#how-to-override-a-lua-package-using-overlays}
 
 Use the following overlay template:
 
@@ -87,18 +93,22 @@ final: prev:
 }
 ```
 
-### Temporary Lua environment with `nix-shell`
+### Temporary Lua environment with `nix-shell` {#temporary-lua-environment-with-nix-shell}
 
 
 There are two methods for loading a shell with Lua packages. The first and recommended method
 is to create an environment with `lua.buildEnv` or `lua.withPackages` and load that. E.g.
+
 ```sh
 $ nix-shell -p 'lua.withPackages(ps: with ps; [ busted luafilesystem ])'
 ```
+
 opens a shell from which you can launch the interpreter
+
 ```sh
 [nix-shell:~] lua
 ```
+
 The other method, which is not recommended, does not create an environment and requires you to list the packages directly,
 
 ```sh
@@ -108,7 +118,7 @@ Again, it is possible to launch the interpreter from the shell.
 The Lua interpreter has the attribute `pkgs` which contains all Lua libraries for that specific interpreter.
 
 
-## Developing with Lua
+## Developing with Lua {#developing-with-lua}
 
 Now that you know how to get a working Lua environment with Nix, it is time
 to go forward and start actually developing with Lua. There are two ways to
@@ -116,7 +126,7 @@ package lua software, either it is on luarocks and most of it can be taken care
 of by the luarocks2nix converter or the packaging has to be done manually.
 Let's present the luarocks way first and the manual one in a second time.
 
-### Packaging a library on luarocks
+### Packaging a library on luarocks {#packaging-a-library-on-luarocks}
 
 [Luarocks.org](www.luarocks.org) is the main repository of lua packages.
 The site proposes two types of packages, the rockspec and the src.rock
@@ -135,10 +145,11 @@ You can try converting luarocks packages to nix packages with the command `nix-s
 Nix rely on luarocks to install lua packages, basically it runs:
 `luarocks make --deps-mode=none --tree $out`
 
-#### Packaging a library manually
+#### Packaging a library manually {#packaging-a-library-manually}
 
 You can develop your package as you usually would, just don't forget to wrap it
 within a `toLuaModule` call, for instance
+
 ```nix
 mynewlib = toLuaModule ( stdenv.mkDerivation { ... });
 ```
@@ -146,16 +157,15 @@ mynewlib = toLuaModule ( stdenv.mkDerivation { ... });
 There is also the `buildLuaPackage` function that can be used when lua modules
 are not packaged for luarocks. You can see a few examples at `pkgs/top-level/lua-packages.nix`.
 
-## Lua Reference
+## Lua Reference {#lua-reference}
 
-### Lua interpreters
+### Lua interpreters {#lua-interpreters}
 
 Versions 5.1, 5.2 and 5.3 of the lua interpreter are available as
 respectively `lua5_1`, `lua5_2` and `lua5_3`. Luajit is available too.
 The Nix expressions for the interpreters can be found in `pkgs/development/interpreters/lua-5`.
 
-
-#### Attributes on lua interpreters packages
+#### Attributes on lua interpreters packages {#attributes-on-lua-interpreters-packages}
 
 Each interpreter has the following attributes:
 
@@ -164,8 +174,7 @@ Each interpreter has the following attributes:
 - `withPackages`. Simpler interface to `buildEnv`.
 - `pkgs`. Set of Lua packages for that specific interpreter. The package set can be modified by overriding the interpreter and passing `packageOverrides`.
 
-
-#### `buildLuarocksPackage` function
+#### `buildLuarocksPackage` function {#buildluarockspackage-function}
 
 The `buildLuarocksPackage` function is implemented in `pkgs/development/interpreters/lua-5/build-lua-package.nix`
 The following is an example:
@@ -205,16 +214,17 @@ install the package
 
 By default `meta.platforms` is set to the same value as the interpreter unless overridden otherwise.
 
-#### `buildLuaApplication` function
+#### `buildLuaApplication` function {#buildluaapplication-function}
 
 The `buildLuaApplication` function is practically the same as `buildLuaPackage`.
 The difference is that `buildLuaPackage` by default prefixes the names of the packages with the version of the interpreter.
 Because with an application we're not interested in multiple version the prefix is dropped.
 
-#### lua.withPackages function
+#### lua.withPackages function {#lua.withpackages-function}
 
 The `lua.withPackages` takes a function as an argument that is passed the set of lua packages and returns the list of packages to be included in the environment.
 Using the `withPackages` function, the previous example for the luafilesystem environment can be written like this:
+
 ```nix
 with import <nixpkgs> {};
 
@@ -223,6 +233,7 @@ lua.withPackages (ps: [ps.luafilesystem])
 
 `withPackages` passes the correct package set for the specific interpreter version as an argument to the function. In the above example, `ps` equals `luaPackages`.
 But you can also easily switch to using `lua5_2`:
+
 ```nix
 with import <nixpkgs> {};
 
@@ -231,13 +242,12 @@ lua5_2.withPackages (ps: [ps.lua])
 
 Now, `ps` is set to `lua52Packages`, matching the version of the interpreter.
 
-
-### Possible Todos
+### Possible Todos {#possible-todos}
 
 * export/use version specific variables such as `LUA_PATH_5_2`/`LUAROCKS_CONFIG_5_2`
 * let luarocks check for dependencies via exporting the different rocktrees in temporary config
 
-### Lua Contributing guidelines
+### Lua Contributing guidelines {#lua-contributing-guidelines}
 
 Following rules should be respected:
 
diff --git a/nixpkgs/doc/languages-frameworks/maven.section.md b/nixpkgs/doc/languages-frameworks/maven.section.md
index d66931e808d7..f53a6fa8ac22 100644
--- a/nixpkgs/doc/languages-frameworks/maven.section.md
+++ b/nixpkgs/doc/languages-frameworks/maven.section.md
@@ -43,9 +43,9 @@ public class Main {
 
 You find this demo project at https://github.com/fzakaria/nixos-maven-example
 
-## Solving for dependencies
+## Solving for dependencies {#solving-for-dependencies}
 
-### buildMaven with NixOS/mvn2nix-maven-plugin
+### buildMaven with NixOS/mvn2nix-maven-plugin {#buildmaven-with-nixosmvn2nix-maven-plugin}
 
 > ⚠️ Although `buildMaven` is the "blessed" way within nixpkgs, as of 2020, it hasn't seen much activity in quite a while.
 
@@ -82,6 +82,7 @@ This file is then given to the `buildMaven` function, and it returns 2 attribute
     A simple derivation that runs through `mvn compile` & `mvn package` to build the JAR. You may use this as inspiration for more complicated derivations.
 
 Here is an [example](https://github.com/fzakaria/nixos-maven-example/blob/main/build-maven-repository.nix) of building the Maven repository
+
 ```nix
 { pkgs ? import <nixpkgs> { } }:
 with pkgs;
@@ -103,7 +104,8 @@ The benefit over the _double invocation_ as we will see below, is that the _/nix
 │       └── 4.1.3
 │           ├── avalon-framework-4.1.3.jar -> /nix/store/iv5fp3955w3nq28ff9xfz86wvxbiw6n9-avalon-framework-4.1.3.jar
 ```
-### Double Invocation
+
+### Double Invocation {#double-invocation}
 
 > ⚠️ This pattern is the simplest but may cause unnecessary rebuilds due to the output hash changing.
 
@@ -163,7 +165,7 @@ The build will fail, and tell you the expected `outputHash` to place. When you'v
 
 If your package uses _SNAPSHOT_ dependencies or _version ranges_; there is a strong likelihood that over-time your output hash will change since the resolved dependencies may change. Hence this method is less recommended then using `buildMaven`.
 
-## Building a JAR
+## Building a JAR {#building-a-jar}
 
 Regardless of which strategy is chosen above, the step to build the derivation is the same.
 
@@ -201,7 +203,7 @@ in stdenv.mkDerivation rec {
 2 directories, 1 file
 ```
 
-## Runnable JAR
+## Runnable JAR {#runnable-jar}
 
 The previous example builds a `jar` file but that's not a file one can run.
 
@@ -213,7 +215,7 @@ We will use the same repository we built above (either _double invocation_ or _b
 
 The following two methods are more suited to Nix then building an [UberJar](https://imagej.net/Uber-JAR) which may be the more traditional approach.
 
-### CLASSPATH
+### CLASSPATH {#classpath}
 
 > This is ideal if you are providing a derivation for _nixpkgs_ and don't want to patch the project's `pom.xml`.
 
@@ -252,11 +254,12 @@ in stdenv.mkDerivation rec {
 }
 ```
 
-### MANIFEST file via Maven Plugin
+### MANIFEST file via Maven Plugin {#manifest-file-via-maven-plugin}
 
 > This is ideal if you are the project owner and want to change your `pom.xml` to set the CLASSPATH within it.
 
 Augment the `pom.xml` to create a JAR with the following manifest:
+
 ```xml
 <build>
   <plugins>
diff --git a/nixpkgs/doc/languages-frameworks/python.section.md b/nixpkgs/doc/languages-frameworks/python.section.md
index 96ac61ab54c5..54face47d1ed 100644
--- a/nixpkgs/doc/languages-frameworks/python.section.md
+++ b/nixpkgs/doc/languages-frameworks/python.section.md
@@ -1,10 +1,10 @@
 # Python {#python}
 
-## User Guide
+## User Guide {#user-guide}
 
-### Using Python
+### Using Python {#using-python}
 
-#### Overview
+#### Overview {#overview}
 
 Several versions of the Python interpreter are available on Nix, as well as a
 high amount of packages. The attribute `python3` refers to the default
@@ -31,7 +31,7 @@ The main package set contains aliases to these package sets, e.g.
 `pythonPackages` refers to `python.pkgs` and `python38Packages` to
 `python38.pkgs`.
 
-#### Installing Python and packages
+#### Installing Python and packages {#installing-python-and-packages}
 
 The Nix and NixOS manuals explain how packages are generally installed. In the
 case of Python and Nix, it is important to make a distinction between whether the
@@ -62,7 +62,7 @@ Philosphically, this should be familiar to users who are used to a `venv` style
 of development: individual projects create their own Python environments without
 impacting the global environment or each other.
 
-#### Ad-hoc temporary Python environment with `nix-shell`
+#### Ad-hoc temporary Python environment with `nix-shell` {#ad-hoc-temporary-python-environment-with-nix-shell}
 
 The simplest way to start playing with the way nix wraps and sets up Python
 environments is with `nix-shell` at the cmdline. These environments create a
@@ -131,7 +131,7 @@ arbitrary dependencies. This is a good way to get a feel for how the Python
 interpreter and dependencies work in Nix and NixOS, but to do some actual
 development, we'll want to make it a bit more persistent.
 
-##### Running Python scripts and using `nix-shell` as shebang
+##### Running Python scripts and using `nix-shell` as shebang {#running-python-scripts-and-using-nix-shell-as-shebang}
 
 Sometimes, we have a script whose header looks like this:
 
@@ -146,7 +146,7 @@ print(f"The dot product of {a} and {b} is: {np.dot(a, b)}")
 Executing this script requires a `python3` that has `numpy`. Using what we learned
 in the previous section, we could startup a shell and just run it like so:
 
-```ShellSesssion
+```ShellSession
 $ nix-shell -p 'python38.withPackages(ps: with ps; [ numpy ])' --run 'python3 foo.py'
 The dot product of [1 2] and [3 4] is: 11
 ```
@@ -203,7 +203,7 @@ of the package versions.
 This is also a great way to ensure the script executes identically on different
 servers.
 
-##### Load environment from `.nix` expression
+##### Load environment from `.nix` expression {#load-environment-from-.nix-expression}
 
 We've now seen how to create an ad-hoc temporary shell session, and how to
 create a single script with Python dependencies, but in the course of normal
@@ -245,7 +245,7 @@ let
     ps.toolz
   ]);
 in mkShell {
-  buildInputs = [
+  packages = [
     pythonEnv
 
     black
@@ -262,7 +262,7 @@ and its Python dependencies, but also tools like `black` or `mypy` and libraries
 like `libffi` the `openssl` in scope. This is generic and can span any number of
 tools or languages across the Nixpkgs ecosystem.
 
-##### Installing environments globally on the system
+##### Installing environments globally on the system {#installing-environments-globally-on-the-system}
 
 Up to now, we've been creating environments scoped to an ad-hoc shell session,
 or a single script, or a single project. This is generally advisable, as it
@@ -315,7 +315,7 @@ If you get a conflict or prefer to keep the setup clean, you can have `nix-env`
 atomically *uninstall* all other imperatively installed packages and replace
 your profile with just `myEnv` by using the `--replace` flag.
 
-##### Environment defined in `/etc/nixos/configuration.nix`
+##### Environment defined in `/etc/nixos/configuration.nix` {#environment-defined-in-etcnixosconfiguration.nix}
 
 For the sake of completeness, here's how to install the environment system-wide
 on NixOS.
@@ -329,7 +329,7 @@ on NixOS.
 }
 ```
 
-### Developing with Python
+### Developing with Python {#developing-with-python}
 
 Above, we were mostly just focused on use cases and what to do to get started
 creating working Python environments in nix.
@@ -338,7 +338,7 @@ Now that you know the basics to be up and running, it is time to take a step
 back and take a deeper look at how Python packages are packaged on Nix. Then,
 we will look at how you can use development mode with your code.
 
-#### Python library packages in Nixpkgs
+#### Python library packages in Nixpkgs {#python-library-packages-in-nixpkgs}
 
 With Nix all packages are built by functions. The main function in Nix for
 building Python libraries is `buildPythonPackage`. Let's see how we can build the
@@ -425,7 +425,7 @@ of `withPackages` we used a `let` expression. You can see that we used
 `toolz` from the Nixpkgs package set this time, but instead took our own version
 that we introduced with the `let` expression.
 
-#### Handling dependencies
+#### Handling dependencies {#handling-dependencies}
 
 Our example, `toolz`, does not have any dependencies on other Python packages or
 system libraries. According to the manual, `buildPythonPackage` uses the
@@ -537,9 +537,10 @@ buildPythonPackage rec {
   };
 }
 ```
+
 Note also the line `doCheck = false;`, we explicitly disabled running the test-suite.
 
-#### Testing Python Packages
+#### Testing Python Packages {#testing-python-packages}
 
 It is highly encouraged to have testing as part of the package build. This
 helps to avoid situations where the package was able to build and install,
@@ -559,10 +560,11 @@ thus can cause issues when a test suite asserts on that behavior.
 as many tests should be enabled as possible. Failing tests can still be
 a good indication that the package is not in a valid state.
 
-#### Using pytest
+#### Using pytest {#using-pytest}
 
 Pytest is the most common test runner for python repositories. A trivial
 test run would be:
+
 ```
   checkInputs = [ pytest ];
   checkPhase = "pytest";
@@ -572,6 +574,7 @@ However, many repositories' test suites do not translate well to nix's build
 sandbox, and will generally need many tests to be disabled.
 
 To filter tests using pytest, one can do the following:
+
 ```
   checkInputs = [ pytest ];
   # avoid tests which need additional data or touch network
@@ -587,19 +590,20 @@ easier than having to create a new package.
 
 `-k` is used to define a predicate for test names. In this example, we are
 filtering out tests which contain `download` or `update` in their test case name.
-Only one `-k` argument is allows, and thus a long predicate should be concatenated
-with "\" and wrapped to the next line.
+Only one `-k` argument is allowed, and thus a long predicate should be concatenated
+with “\\” and wrapped to the next line.
 
-*NOTE:* In pytest==6.0.1, the use of "\" to continue a line (e.g. `-k 'not download \'`) has
+*NOTE:* In pytest==6.0.1, the use of “\\” to continue a line (e.g. `-k 'not download \'`) has
 been removed, in this case, it's recommended to use `pytestCheckHook`.
 
-#### Using pytestCheckHook
+#### Using pytestCheckHook {#using-pytestcheckhook}
 
 `pytestCheckHook` is a convenient hook which will substitute the setuptools
 `test` command for a checkPhase which runs `pytest`. This is also beneficial
 when a package may need many items disabled to run the test suite.
 
 Using the example above, the analagous pytestCheckHook usage would be:
+
 ```
   checkInputs = [ pytestCheckHook ];
 
@@ -637,7 +641,7 @@ Trying to concatenate the related strings to disable tests in a regular checkPha
 would be much harder to read. This also enables us to comment on why specific tests
 are disabled.
 
-#### Using pythonImportsCheck
+#### Using pythonImportsCheck {#using-pythonimportscheck}
 
 Although unit tests are highly prefered to validate correctness of a package, not
 all packages have test suites that can be ran easily, and some have none at all.
@@ -659,7 +663,7 @@ However, this is done in it's own phase, and not dependent on whether `doCheck =
 This can also be useful in verifying that the package doesn't assume commonly
 present packages (e.g. `setuptools`)
 
-### Develop local package
+### Develop local package {#develop-local-package}
 
 As a Python developer you're likely aware of [development mode](http://setuptools.readthedocs.io/en/latest/setuptools.html#development-mode)
 (`python setup.py develop`); instead of installing the package this command
@@ -694,7 +698,7 @@ buildPythonPackage rec {
 It is important to note that due to how development mode is implemented on Nix
 it is not possible to have multiple packages simultaneously in development mode.
 
-### Organising your packages
+### Organising your packages {#organising-your-packages}
 
 So far we discussed how you can use Python on Nix, and how you can develop with
 it. We've looked at how you write expressions to package Python packages, and we
@@ -706,7 +710,7 @@ like to be able to use in different projects. In order to minimise unnecessary
 duplication we now look at how you can maintain a repository with your
 own packages. The important functions here are `import` and `callPackage`.
 
-### Including a derivation using `callPackage`
+### Including a derivation using `callPackage` {#including-a-derivation-using-callpackage}
 
 Earlier we created a Python environment using `withPackages`, and included the
 `toolz` package via a `let` expression.
@@ -756,9 +760,9 @@ don't explicitly define which `python` derivation should be used. In the above
 example we use `buildPythonPackage` that is part of the set `python38Packages`,
 and in this case the `python38` interpreter is automatically used.
 
-## Reference
+## Reference {#reference}
 
-### Interpreters
+### Interpreters {#interpreters}
 
 Versions 2.7, 3.6, 3.7, 3.8 and 3.9 of the CPython interpreter are available as
 respectively `python27`, `python36`, `python37`, `python38` and `python39`. The
@@ -773,11 +777,11 @@ All packages depending on any Python interpreter get appended
 `out/{python.sitePackages}` to `$PYTHONPATH` if such directory
 exists.
 
-#### Missing `tkinter` module standard library
+#### Missing `tkinter` module standard library {#missing-tkinter-module-standard-library}
 
 To reduce closure size the `Tkinter`/`tkinter` is available as a separate package, `pythonPackages.tkinter`.
 
-#### Attributes on interpreters packages
+#### Attributes on interpreters packages {#attributes-on-interpreters-packages}
 
 Each interpreter has the following attributes:
 
@@ -789,7 +793,7 @@ Each interpreter has the following attributes:
 - `executable`. Name of the interpreter executable, e.g. `python3.8`.
 - `pkgs`. Set of Python packages for that specific interpreter. The package set can be modified by overriding the interpreter and passing `packageOverrides`.
 
-### Optimizations
+### Optimizations {#optimizations}
 
 The Python interpreters are by default not build with optimizations enabled, because
 the builds are in that case not reproducible. To enable optimizations, override the
@@ -806,7 +810,7 @@ let
 in mypython
 ```
 
-### Building packages and applications
+### Building packages and applications {#building-packages-and-applications}
 
 Python libraries and applications that use `setuptools` or
 `distutils` are typically built with respectively the `buildPythonPackage` and
@@ -838,7 +842,7 @@ and the aliases
 * `pkgs.python3Packages` pointing to `pkgs.python38Packages`
 * `pkgs.pythonPackages` pointing to `pkgs.python2Packages`
 
-#### `buildPythonPackage` function
+#### `buildPythonPackage` function {#buildpythonpackage-function}
 
 The `buildPythonPackage` function is implemented in
 `pkgs/development/interpreters/python/mk-python-derivation`
@@ -847,7 +851,7 @@ using setup hooks.
 The following is an example:
 
 ```nix
-{ lib, buildPythonPackage, fetchPypi, hypothesis, setuptools_scm, attrs, py, setuptools, six, pluggy }:
+{ lib, buildPythonPackage, fetchPypi, hypothesis, setuptools-scm, attrs, py, setuptools, six, pluggy }:
 
 buildPythonPackage rec {
   pname = "pytest";
@@ -864,7 +868,7 @@ buildPythonPackage rec {
   '';
 
   checkInputs = [ hypothesis ];
-  nativeBuildInputs = [ setuptools_scm ];
+  nativeBuildInputs = [ setuptools-scm ];
   propagatedBuildInputs = [ attrs py setuptools six pluggy ];
 
   meta = with lib; {
@@ -890,7 +894,7 @@ e.g. the test runner, should be added to `checkInputs`.
 By default `meta.platforms` is set to the same value
 as the interpreter unless overridden otherwise.
 
-##### `buildPythonPackage` parameters
+##### `buildPythonPackage` parameters {#buildpythonpackage-parameters}
 
 All parameters from `stdenv.mkDerivation` function are still supported. The
 following are specific to `buildPythonPackage`:
@@ -946,7 +950,7 @@ because their behaviour is different:
   `buildPythonPackage` also injects code into and wraps executables with the
   paths included in this list. Items listed in `install_requires` go here.
 
-##### Overriding Python packages
+##### Overriding Python packages {#overriding-python-packages}
 
 The `buildPythonPackage` function has a `overridePythonAttrs` method that can be
 used to override the package. In the following example we create an environment
@@ -974,7 +978,7 @@ with import <nixpkgs> {};
 in python.withPackages(ps: [ps.blaze])).env
 ```
 
-#### `buildPythonApplication` function
+#### `buildPythonApplication` function {#buildpythonapplication-function}
 
 The `buildPythonApplication` function is practically the same as
 `buildPythonPackage`. The main purpose of this function is to build a Python
@@ -1019,7 +1023,7 @@ luigi = callPackage ../applications/networking/cluster/luigi { };
 Since the package is an application, a consumer doesn't need to care about
 Python versions or modules, which is why they don't go in `pythonPackages`.
 
-#### `toPythonApplication` function
+#### `toPythonApplication` function {#topythonapplication-function}
 
 A distinction is made between applications and libraries, however, sometimes a
 package is used as both. In this case the package is added as a library to
@@ -1031,11 +1035,12 @@ The Nix expression shall use `buildPythonPackage` and be called from
 `python-packages.nix`. A reference shall be created from `all-packages.nix` to
 the attribute in `python-packages.nix`, and the `toPythonApplication` shall be
 applied to the reference:
+
 ```nix
 youtube-dl = with pythonPackages; toPythonApplication youtube-dl;
 ```
 
-#### `toPythonModule` function
+#### `toPythonModule` function {#topythonmodule-function}
 
 In some cases, such as bindings, a package is created using
 `stdenv.mkDerivation` and added as attribute in `all-packages.nix`. The Python
@@ -1052,7 +1057,7 @@ opencv = toPythonModule (pkgs.opencv.override {
 
 Do pay attention to passing in the right Python version!
 
-#### `python.buildEnv` function
+#### `python.buildEnv` function {#python.buildenv-function}
 
 Python environments can be created using the low-level `pkgs.buildEnv` function.
 This example shows how to create an environment that has the Pyramid Web Framework.
@@ -1090,8 +1095,8 @@ with import <nixpkgs> {};
 will drop you into a shell where Python will have the
 specified packages in its path.
 
+##### `python.buildEnv` arguments {#python.buildenv-arguments}
 
-##### `python.buildEnv` arguments
 
 * `extraLibs`: List of packages installed inside the environment.
 * `postBuild`: Shell command executed after the build of environment.
@@ -1099,7 +1104,7 @@ specified packages in its path.
 * `permitUserSite`: Skip setting the `PYTHONNOUSERSITE` environment variable in
   wrapped binaries in the environment.
 
-#### `python.withPackages` function
+#### `python.withPackages` function {#python.withpackages-function}
 
 The `python.withPackages` function provides a simpler interface to the `python.buildEnv` functionality.
 It takes a function as an argument that is passed the set of python packages and returns the list
@@ -1141,7 +1146,7 @@ need them, you have to use `python.buildEnv`.
 Python 2 namespace packages may provide `__init__.py` that collide. In that case
 `python.buildEnv` should be used with `ignoreCollisions = true`.
 
-#### Setup hooks
+#### Setup hooks {#setup-hooks}
 
 The following are setup hooks specifically for Python packages. Most of these
 are used in `buildPythonPackage`.
@@ -1166,7 +1171,7 @@ are used in `buildPythonPackage`.
 - `wheelUnpackHook` to move a wheel to the correct folder so it can be installed
   with the `pipInstallHook`.
 
-### Development mode
+### Development mode {#development-mode}
 
 Development or editable mode is supported. To develop Python packages
 `buildPythonPackage` has additional logic inside `shellPhase` to run `pip
@@ -1175,6 +1180,7 @@ install -e . --prefix $TMPDIR/`for the package.
 Warning: `shellPhase` is executed only if `setup.py` exists.
 
 Given a `default.nix`:
+
 ```nix
 with import <nixpkgs> {};
 
@@ -1197,7 +1203,7 @@ nix-shell -p pythonPackages.pyramid zlib libjpeg git
 
 Note: There is a boolean value `lib.inNixShell` set to `true` if nix-shell is invoked.
 
-### Tools
+### Tools {#tools}
 
 Packages inside nixpkgs are written by hand. However many tools exist in
 community to help save time. No tool is preferred at the moment.
@@ -1209,7 +1215,7 @@ community to help save time. No tool is preferred at the moment.
 - [nixpkgs-pytools](https://github.com/nix-community/nixpkgs-pytools)
 - [poetry2nix](https://github.com/nix-community/poetry2nix)
 
-### Deterministic builds
+### Deterministic builds {#deterministic-builds}
 
 The Python interpreters are now built deterministically. Minor modifications had
 to be made to the interpreters in order to generate deterministic bytecode. This
@@ -1221,7 +1227,7 @@ have timestamp 1. The `buildPythonPackage` function sets `DETERMINISTIC_BUILD=1`
 and [PYTHONHASHSEED=0](https://docs.python.org/3.8/using/cmdline.html#envvar-PYTHONHASHSEED).
 Both are also exported in `nix-shell`.
 
-### Automatic tests
+### Automatic tests {#automatic-tests}
 
 It is recommended to test packages as part of the build process.
 Source distributions (`sdist`) often include test files, but not always.
@@ -1230,7 +1236,7 @@ By default the command `python setup.py test` is run as part of the
 `checkPhase`, but often it is necessary to pass a custom `checkPhase`. An
 example of such a situation is when `py.test` is used.
 
-#### Common issues
+#### Common issues {#common-issues}
 
 * Non-working tests can often be deselected. By default `buildPythonPackage`
   runs `python setup.py test`. Most Python modules follows the standard test
@@ -1247,18 +1253,19 @@ example of such a situation is when `py.test` is used.
     '';
   }
   ```
+
 * Tests that attempt to access `$HOME` can be fixed by using the following
   work-around before running tests (e.g. `preCheck`): `export HOME=$(mktemp -d)`
 
-## FAQ
+## FAQ {#faq}
 
-### How to solve circular dependencies?
+### How to solve circular dependencies? {#how-to-solve-circular-dependencies}
 
 Consider the packages `A` and `B` that depend on each other. When packaging `B`,
 a solution is to override package `A` not to depend on `B` as an input. The same
 should also be done when packaging `A`.
 
-### How to override a Python package?
+### How to override a Python package? {#how-to-override-a-python-package}
 
 We can override the interpreter and pass `packageOverrides`. In the following
 example we rename the `pandas` package and build it.
@@ -1316,7 +1323,7 @@ let
 in newpkgs.inkscape
 ```
 
-### `python setup.py bdist_wheel` cannot create .whl
+### `python setup.py bdist_wheel` cannot create .whl {#python-setup.py-bdist_wheel-cannot-create-.whl}
 
 Executing `python setup.py bdist_wheel` in a `nix-shell `fails with
 ```
@@ -1349,7 +1356,7 @@ or unset `SOURCE_DATE_EPOCH`:
 nix-shell --run "unset SOURCE_DATE_EPOCH; python3 setup.py bdist_wheel"
 ```
 
-### `install_data` / `data_files` problems
+### `install_data` / `data_files` problems {#install_data-data_files-problems}
 
 If you get the following error:
 
@@ -1369,7 +1376,7 @@ ${python.interpreter} setup.py install_data --install-dir=$out --root=$out
 sed -i '/ = data\_files/d' setup.py
 ```
 
-###  Rationale of non-existent global site-packages
+### Rationale of non-existent global site-packages {#rationale-of-non-existent-global-site-packages}
 
 On most operating systems a global `site-packages` is maintained. This however
 becomes problematic if you want to run multiple Python versions or have multiple
@@ -1384,7 +1391,7 @@ If you want to create a Python environment for development, then the recommended
 method is to use `nix-shell`, either with or without the `python.buildEnv`
 function.
 
-### How to consume Python modules using pip in a virtual environment like I am used to on other Operating Systems?
+### How to consume Python modules using pip in a virtual environment like I am used to on other Operating Systems? {#how-to-consume-python-modules-using-pip-in-a-virtual-environment-like-i-am-used-to-on-other-operating-systems}
 
 While this approach is not very idiomatic from Nix perspective, it can still be
 useful when dealing with pre-existing projects or in situations where it's not
@@ -1497,7 +1504,7 @@ is executed it will attempt to download the Python modules listed in
 requirements.txt. However these will be cached locally within the `virtualenv`
 folder and not downloaded again.
 
-### How to override a Python package from `configuration.nix`?
+### How to override a Python package from `configuration.nix`? {#how-to-override-a-python-package-from-configuration.nix}
 
 If you need to change a package's attribute(s) from `configuration.nix` you could do:
 
@@ -1535,7 +1542,7 @@ this snippet:
   }
 ```
 
-### How to override a Python package using overlays?
+### How to override a Python package using overlays? {#how-to-override-a-python-package-using-overlays}
 
 Use the following overlay template:
 
@@ -1556,12 +1563,12 @@ self: super: {
 }
 ```
 
-### How to use Intel's MKL with numpy and scipy?
+### How to use Intel’s MKL with numpy and scipy? {#how-to-use-intels-mkl-with-numpy-and-scipy}
 
 MKL can be configured using an overlay. See the section "[Using overlays to
 configure alternatives](#sec-overlays-alternatives-blas-lapack)".
 
-### What inputs do `setup_requires`, `install_requires` and `tests_require` map to?
+### What inputs do `setup_requires`, `install_requires` and `tests_require` map to? {#what-inputs-do-setup_requires-install_requires-and-tests_require-map-to}
 
 In a `setup.py` or `setup.cfg` it is common to declare dependencies:
 
@@ -1569,9 +1576,9 @@ In a `setup.py` or `setup.cfg` it is common to declare dependencies:
 * `install_requires` corresponds to `propagatedBuildInputs`
 * `tests_require` corresponds to `checkInputs`
 
-## Contributing
+## Contributing {#contributing}
 
-### Contributing guidelines
+### Contributing guidelines {#contributing-guidelines}
 
 The following rules are desired to be respected:
 
diff --git a/nixpkgs/doc/languages-frameworks/qt.section.md b/nixpkgs/doc/languages-frameworks/qt.section.md
index 6f8c9626e6de..986deeb0d4b2 100644
--- a/nixpkgs/doc/languages-frameworks/qt.section.md
+++ b/nixpkgs/doc/languages-frameworks/qt.section.md
@@ -90,19 +90,21 @@ stdenv.mkDerivation {
 }
 ```
 
-::: note
+::: {.note}
 `wrapQtAppsHook` ignores files that are non-ELF executables.
 This means that scripts won't be automatically wrapped so you'll need to manually wrap them as previously mentioned.
 An example of when you'd always need to do this is with Python applications that use PyQt.
 :::
 
-## Adding a library to Nixpkgs
+## Adding a library to Nixpkgs {#adding-a-library-to-nixpkgs}
+
 Add Qt libraries to `qt5-packages.nix` to make them available for every
 supported Qt version.
 
 ### Example adding a Qt library {#qt-library-all-packages-nix}
 
 The following represents the contents of `qt5-packages.nix`.
+
 ```nix
 {
   # ...
@@ -126,13 +128,15 @@ stdenv.mkDerivation {
 }
 ```
 
-## Adding an application to Nixpkgs
+## Adding an application to Nixpkgs {#adding-an-application-to-nixpkgs}
+
 Add Qt applications to `qt5-packages.nix`. Add an alias to `all-packages.nix`
 to select the Qt 5 version used for the application.
 
 ### Example adding a Qt application {#qt-application-all-packages-nix}
 
 The following represents the contents of `qt5-packages.nix`.
+
 ```nix
 {
   # ...
@@ -144,6 +148,7 @@ The following represents the contents of `qt5-packages.nix`.
 ```
 
 The following represents the contents of `all-packages.nix`.
+
 ```nix
 {
   # ...
diff --git a/nixpkgs/doc/languages-frameworks/r.section.md b/nixpkgs/doc/languages-frameworks/r.section.md
index c420d112c91e..56e3da64df2a 100644
--- a/nixpkgs/doc/languages-frameworks/r.section.md
+++ b/nixpkgs/doc/languages-frameworks/r.section.md
@@ -1,6 +1,6 @@
 # R {#r}
 
-## Installation
+## Installation {#installation}
 
 Define an environment for R that contains all the libraries that you'd like to
 use by adding the following snippet to your $HOME/.config/nixpkgs/config.nix file:
@@ -31,6 +31,7 @@ output is the name that has to be passed to rWrapper in the code snipped above.
 However, if you'd like to add a file to your project source to make the
 environment available for other contributors, you can create a `default.nix`
 file like so:
+
 ```nix
 with import <nixpkgs> {};
 {
@@ -50,7 +51,7 @@ with import <nixpkgs> {};
 and then run `nix-shell .` to be dropped into a shell with those packages
 available.
 
-## RStudio
+## RStudio {#rstudio}
 
 RStudio uses a standard set of packages and ignores any custom R
 environments or installed packages you may have.  To create a custom
@@ -93,7 +94,7 @@ Executing `nix-shell` will then drop you into an environment equivalent to the
 one above. If you need additional packages just add them to the list and
 re-enter the shell.
 
-## Updating the package set
+## Updating the package set {#updating-the-package-set}
 
 ```bash
 nix-shell generate-shell.nix
@@ -113,8 +114,7 @@ mv bioc-experiment-packages.nix.new bioc-experiment-packages.nix
 
 `generate-r-packages.R <repo>` reads  `<repo>-packages.nix`, therefor the renaming.
 
-
-## Testing if the Nix-expression could be evaluated
+## Testing if the Nix-expression could be evaluated {#testing-if-the-nix-expression-could-be-evaluated}
 
 ```bash
 nix-build test-evaluation.nix --dry-run
diff --git a/nixpkgs/doc/languages-frameworks/ruby.section.md b/nixpkgs/doc/languages-frameworks/ruby.section.md
index c519d79d3daf..36b794458cba 100644
--- a/nixpkgs/doc/languages-frameworks/ruby.section.md
+++ b/nixpkgs/doc/languages-frameworks/ruby.section.md
@@ -1,6 +1,6 @@
 # Ruby {#sec-language-ruby}
 
-## Using Ruby
+## Using Ruby {#using-ruby}
 
 Several versions of Ruby interpreters are available on Nix, as well as over 250 gems and many applications written in Ruby. The attribute `ruby` refers to the default Ruby interpreter, which is currently MRI 2.6. It's also possible to refer to specific versions, e.g. `ruby_2_y`, `jruby`, or `mruby`.
 
@@ -12,7 +12,7 @@ The interpreters have common attributes, namely `gems`, and `withPackages`. So y
 
 Since not all gems have executables like `nokogiri`, it's usually more convenient to use the `withPackages` function like this: `ruby.withPackages (p: with p; [ nokogiri ])`. This will also make sure that the Ruby in your environment will be able to find the gem and it can be used in your Ruby code (for example via `ruby` or `irb` executables) via `require "nokogiri"` as usual.
 
-### Temporary Ruby environment with `nix-shell`
+### Temporary Ruby environment with `nix-shell` {#temporary-ruby-environment-with-nix-shell}
 
 Rather than having a single Ruby environment shared by all Ruby development projects on a system, Nix allows you to create separate environments per project. `nix-shell` gives you the possibility to temporarily load another environment akin to a combined `chruby` or `rvm` and `bundle exec`.
 
@@ -30,7 +30,7 @@ $ nix-shell -p ruby.gems.nokogiri ruby.gems.pry
 
 Again, it's possible to launch the interpreter from the shell. The Ruby interpreter has the attribute `gems` which contains all Ruby gems for that specific interpreter.
 
-#### Load Ruby environment from `.nix` expression
+#### Load Ruby environment from `.nix` expression {#load-ruby-environment-from-.nix-expression}
 
 As explained in the Nix manual, `nix-shell` can also load an expression from a `.nix` file. Say we want to have Ruby 2.6, `nokogori`, and `pry`. Consider a `shell.nix` file with:
 
@@ -45,7 +45,7 @@ What's happening here?
 2. Then we create a Ruby environment with the `withPackages` function.
 3. The `withPackages` function expects us to provide a function as an argument that takes the set of all ruby gems and returns a list of packages to include in the environment. Here, we select the packages `nokogiri` and `pry` from the package set.
 
-#### Execute command with `--run`
+#### Execute command with `--run` {#execute-command-with---run}
 
 A convenient flag for `nix-shell` is `--run`. It executes a command in the `nix-shell`. We can e.g. directly open a `pry` REPL:
 
@@ -65,7 +65,7 @@ Or run a script using this environment:
 $ nix-shell -p "ruby.withPackages (ps: with ps; [ nokogiri pry ])" --run "ruby example.rb"
 ```
 
-#### Using `nix-shell` as shebang
+#### Using `nix-shell` as shebang {#using-nix-shell-as-shebang}
 
 In fact, for the last case, there is a more convenient method. You can add a [shebang](<https://en.wikipedia.org/wiki/Shebang_(Unix)>) to your script specifying which dependencies `nix-shell` needs. With the following shebang, you can just execute `./example.rb`, and it will run with all dependencies.
 
@@ -80,9 +80,9 @@ body = RestClient.get('http://example.com').body
 puts Nokogiri::HTML(body).at('h1').text
 ```
 
-## Developing with Ruby
+## Developing with Ruby {#developing-with-ruby}
 
-### Using an existing Gemfile
+### Using an existing Gemfile {#using-an-existing-gemfile}
 
 In most cases, you'll already have a `Gemfile.lock` listing all your dependencies. This can be used to generate a `gemset.nix` which is used to fetch the gems and combine them into a single environment. The reason why you need to have a separate file for this, is that Nix requires you to have a checksum for each input to your build. Since the `Gemfile.lock` that `bundler` generates doesn't provide us with checksums, we have to first download each gem, calculate its SHA256, and store it in this separate file.
 
@@ -106,7 +106,7 @@ let
     name = "gems-for-some-project";
     gemdir = ./.;
   };
-in mkShell { buildInputs = [ gems gems.wrappedRuby ]; }
+in mkShell { packages = [ gems gems.wrappedRuby ]; }
 ```
 
 With this file in your directory, you can run `nix-shell` to build and use the gems. The important parts here are `bundlerEnv` and `wrappedRuby`.
@@ -120,7 +120,7 @@ One common issue that you might have is that you have Ruby 2.6, but also `bundle
 mkShell { buildInputs = [ gems (lowPrio gems.wrappedRuby) ]; }
 ```
 
-### Gem-specific configurations and workarounds
+### Gem-specific configurations and workarounds {#gem-specific-configurations-and-workarounds}
 
 In some cases, especially if the gem has native extensions, you might need to modify the way the gem is built.
 
@@ -201,7 +201,7 @@ $ nix-shell --run 'ruby -rpg -e "puts PG.library_version"'
 
 Of course for this use-case one could also use overlays since the configuration for `pg` depends on the `postgresql` alias, but for demonstration purposes this has to suffice.
 
-### Adding a gem to the default gemset
+### Adding a gem to the default gemset {#adding-a-gem-to-the-default-gemset}
 
 Now that you know how to get a working Ruby environment with Nix, it's time to go forward and start actually developing with Ruby. We will first have a look at how Ruby gems are packaged on Nix. Then, we will look at how you can use development mode with your code.
 
@@ -215,7 +215,7 @@ To test that it works, you can then try using the gem with:
 NIX_PATH=nixpkgs=$PWD nix-shell -p "ruby.withPackages (ps: with ps; [ name-of-your-gem ])"
 ```
 
-### Packaging applications
+### Packaging applications {#packaging-applications}
 
 A common task is to add a ruby executable to nixpkgs, popular examples would be `chef`, `jekyll`, or `sass`. A good way to do that is to use the `bundlerApp` function, that allows you to make a package that only exposes the listed executables, otherwise the package may cause conflicts through common paths like `bin/rake` or `bin/bundler` that aren't meant to be used.
 
@@ -243,7 +243,7 @@ bundlerApp {
 
 All that's left to do is to generate the corresponding `Gemfile.lock` and `gemset.nix` as described above in the `Using an existing Gemfile` section.
 
-#### Packaging executables that require wrapping
+#### Packaging executables that require wrapping {#packaging-executables-that-require-wrapping}
 
 Sometimes your app will depend on other executables at runtime, and tries to find it through the `PATH` environment variable.
 
diff --git a/nixpkgs/doc/languages-frameworks/rust.section.md b/nixpkgs/doc/languages-frameworks/rust.section.md
index d1a6a566774c..f5c664bec20e 100644
--- a/nixpkgs/doc/languages-frameworks/rust.section.md
+++ b/nixpkgs/doc/languages-frameworks/rust.section.md
@@ -15,7 +15,7 @@ For other versions such as daily builds (beta and nightly),
 use either `rustup` from nixpkgs (which will manage the rust installation in your home directory),
 or use Mozilla's [Rust nightlies overlay](#using-the-rust-nightlies-overlay).
 
-## Compiling Rust applications with Cargo
+## Compiling Rust applications with Cargo {#compiling-rust-applications-with-cargo}
 
 Rust applications are packaged by using the `buildRustPackage` helper from `rustPlatform`:
 
@@ -107,8 +107,56 @@ rustPlatform.buildRustPackage rec {
 }
 ```
 
+### Importing a `Cargo.lock` file {#importing-a-cargo.lock-file}
 
-### Cross compilation
+Using `cargoSha256` or `cargoHash` is tedious when using
+`buildRustPackage` within a project, since it requires that the hash
+is updated after every change to `Cargo.lock`. Therefore,
+`buildRustPackage` also supports vendoring dependencies directly from
+a `Cargo.lock` file using the `cargoLock` argument. For example:
+
+```nix
+rustPlatform.buildRustPackage rec {
+  pname = "myproject";
+  version = "1.0.0";
+
+  cargoLock = {
+    lockFile = ./Cargo.lock;
+  }
+
+  # ...
+}
+```
+
+This will retrieve the dependencies using fixed-output derivations from
+the specified lockfile.
+
+The output hash of each dependency that uses a git source must be
+specified in the `outputHashes` attribute. For example:
+
+```nix
+rustPlatform.buildRustPackage rec {
+  pname = "myproject";
+  version = "1.0.0";
+
+  cargoLock = {
+    lockFile = ./Cargo.lock;
+    outputHashes = {
+      "finalfusion-0.14.0" = "17f4bsdzpcshwh74w5z119xjy2if6l2wgyjy56v621skr2r8y904";
+    };
+  }
+
+  # ...
+}
+```
+
+If you do not specify an output hash for a git dependency, building
+the package will fail and inform you of which crate needs to be
+added. To find the correct hash, you can first use `lib.fakeSha256` or
+`lib.fakeHash` as a stub hash. Building the package (and thus the
+vendored dependencies) will then inform you of the correct hash.
+
+### Cross compilation {#cross-compilation}
 
 By default, Rust packages are compiled for the host platform, just like any
 other package is.  The `--target` passed to rust tools is computed from this.
@@ -120,6 +168,7 @@ where they are known to differ. But there are ways to customize the argument:
    name will be used instead.
 
    For example:
+
    ```nix
    import <nixpkgs> {
      crossSystem = (import <nixpkgs/lib>).systems.examples.armhf-embedded // {
@@ -127,7 +176,9 @@ where they are known to differ. But there are ways to customize the argument:
      };
    }
    ```
+
    will result in:
+
    ```shell
    --target thumbv7em-none-eabi
    ```
@@ -140,6 +191,7 @@ where they are known to differ. But there are ways to customize the argument:
    will be used instead.
 
    For example:
+
    ```nix
    import <nixpkgs> {
      crossSystem = (import <nixpkgs/lib>).systems.examples.armhf-embedded // {
@@ -148,7 +200,9 @@ where they are known to differ. But there are ways to customize the argument:
      };
    }
    ```
+
    will result in:
+
    ```shell
    --target /nix/store/asdfasdfsadf-thumb-crazy.json # contains {"foo":"","bar":""}
    ```
@@ -172,7 +226,7 @@ ad-hoc escape hatch to `buildRustPackage` can be removed.
 Note that currently custom targets aren't compiled with `std`, so `cargo test`
 will fail. This can be ignored by adding `doCheck = false;` to your derivation.
 
-### Running package tests
+### Running package tests {#running-package-tests}
 
 When using `buildRustPackage`, the `checkPhase` is enabled by default and runs
 `cargo test` on the package to build. To make sure that we don't compile the
@@ -200,7 +254,7 @@ Another attribute, called `checkFlags`, is used to pass arguments to the test
 binary itself, as stated
 (here)[https://doc.rust-lang.org/cargo/commands/cargo-test.html].
 
-#### Tests relying on the structure of the `target/` directory
+#### Tests relying on the structure of the `target/` directory {#tests-relying-on-the-structure-of-the-target-directory}
 
 Some tests may rely on the structure of the `target/` directory. Those tests
 are likely to fail because we use `cargo --target` during the build. This means that
@@ -210,7 +264,7 @@ rather than in `target/release/`.
 
 This can only be worked around by patching the affected tests accordingly.
 
-#### Disabling package-tests
+#### Disabling package-tests {#disabling-package-tests}
 
 In some instances, it may be necessary to disable testing altogether (with `doCheck = false;`):
 
@@ -224,7 +278,7 @@ The above are just guidelines, and exceptions may be granted on a case-by-case b
 However, please check if it's possible to disable a problematic subset of the
 test suite and leave a comment explaining your reasoning.
 
-#### Setting `test-threads`
+#### Setting `test-threads` {#setting-test-threads}
 
 `buildRustPackage` will use parallel test threads by default,
 sometimes it may be necessary to disable this so the tests run consecutively.
@@ -236,7 +290,7 @@ rustPlatform.buildRustPackage {
 }
 ```
 
-### Building a package in `debug` mode
+### Building a package in `debug` mode {#building-a-package-in-debug-mode}
 
 By default, `buildRustPackage` will use `release` mode for builds. If a package
 should be built in `debug` mode, it can be configured like so:
@@ -250,14 +304,14 @@ rustPlatform.buildRustPackage {
 
 In this scenario, the `checkPhase` will be ran in `debug` mode as well.
 
-### Custom `build`/`install`-procedures
+### Custom `build`/`install`-procedures {#custom-buildinstall-procedures}
 
 Some packages may use custom scripts for building/installing, e.g. with a `Makefile`.
 In these cases, it's recommended to override the `buildPhase`/`installPhase`/`checkPhase`.
 
 Otherwise, some steps may fail because of the modified directory structure of `target/`.
 
-### Building a crate with an absent or out-of-date Cargo.lock file
+### Building a crate with an absent or out-of-date Cargo.lock file {#building-a-crate-with-an-absent-or-out-of-date-cargo.lock-file}
 
 `buildRustPackage` needs a `Cargo.lock` file to get all dependencies in the
 source code in a reproducible way. If it is missing or out-of-date one can use
@@ -273,13 +327,13 @@ rustPlatform.buildRustPackage rec {
 }
 ```
 
-## Compiling non-Rust packages that include Rust code
+## Compiling non-Rust packages that include Rust code {#compiling-non-rust-packages-that-include-rust-code}
 
 Several non-Rust packages incorporate Rust code for performance- or
 security-sensitive parts. `rustPlatform` exposes several functions and
 hooks that can be used to integrate Cargo in non-Rust packages.
 
-### Vendoring of dependencies
+### Vendoring of dependencies {#vendoring-of-dependencies}
 
 Since network access is not allowed in sandboxed builds, Rust crate
 dependencies need to be retrieved using a fetcher. `rustPlatform`
@@ -308,7 +362,38 @@ attributes can also be used:
   the `Cargo.lock`/`Cargo.toml` files need to be patched before
   vendoring.
 
-### Hooks
+If a `Cargo.lock` file is available, you can alternatively use the
+`importCargoLock` function. In contrast to `fetchCargoTarball`, this
+function does not require a hash (unless git dependencies are used)
+and fetches every dependency as a separate fixed-output derivation.
+`importCargoLock` can be used as follows:
+
+```
+cargoDeps = rustPlatform.importCargoLock {
+  lockFile = ./Cargo.lock;
+};
+```
+
+If the `Cargo.lock` file includes git dependencies, then their output
+hashes need to be specified since they are not available through the
+lock file. For example:
+
+```
+cargoDeps = rustPlatform.importCargoLock {
+  lockFile = ./Cargo.lock;
+  outputHashes = {
+    "rand-0.8.3" = "0ya2hia3cn31qa8894s3av2s8j5bjwb6yq92k0jsnlx7jid0jwqa";
+  };
+};
+```
+
+If you do not specify an output hash for a git dependency, building
+`cargoDeps` will fail and inform you of which crate needs to be
+added. To find the correct hash, you can first use `lib.fakeSha256` or
+`lib.fakeHash` as a stub hash. Building `cargoDeps` will then inform
+you of the correct hash.
+
+### Hooks {#hooks}
 
 `rustPlatform` provides the following hooks to automate Cargo builds:
 
@@ -337,9 +422,9 @@ attributes can also be used:
 * `cargoInstallHook`: install binaries and static/shared libraries
   that were built using `cargoBuildHook`.
 
-### Examples
+### Examples {#examples}
 
-#### Python package using `setuptools-rust`
+#### Python package using `setuptools-rust` {#python-package-using-setuptools-rust}
 
 For Python packages using `setuptools-rust`, you can use
 `fetchCargoTarball` and `cargoSetupHook` to retrieve and set up Cargo
@@ -425,7 +510,7 @@ buildPythonPackage rec {
 }
 ```
 
-#### Python package using `maturin`
+#### Python package using `maturin` {#python-package-using-maturin}
 
 Python packages that use [Maturin](https://github.com/PyO3/maturin)
 can be built with `fetchCargoTarball`, `cargoSetupHook`, and
@@ -466,9 +551,9 @@ buildPythonPackage rec {
 }
 ```
 
-## Compiling Rust crates using Nix instead of Cargo
+## Compiling Rust crates using Nix instead of Cargo {#compiling-rust-crates-using-nix-instead-of-cargo}
 
-### Simple operation
+### Simple operation {#simple-operation}
 
 When run, `cargo build` produces a file called `Cargo.lock`,
 containing pinned versions of all dependencies. Nixpkgs contains a
@@ -479,14 +564,15 @@ That Nix expression calls `rustc` directly (hence bypassing Cargo),
 and can be used to compile a crate and all its dependencies. Here is
 an example for a minimal `hello` crate:
 
-
-    $ cargo new hello
-    $ cd hello
-    $ cargo build
+```ShellSession
+$ cargo new hello
+$ cd hello
+$ cargo build
      Compiling hello v0.1.0 (file:///tmp/hello)
-      Finished dev [unoptimized + debuginfo] target(s) in 0.20 secs
-    $ carnix -o hello.nix --src ./. Cargo.lock --standalone
-    $ nix-build hello.nix -A hello_0_1_0
+     Finished dev [unoptimized + debuginfo] target(s) in 0.20 secs
+$ carnix -o hello.nix --src ./. Cargo.lock --standalone
+$ nix-build hello.nix -A hello_0_1_0
+```
 
 Now, the file produced by the call to `carnix`, called `hello.nix`, looks like:
 
@@ -565,7 +651,7 @@ Here, the `libc` crate has no `src` attribute, so `buildRustCrate`
 will fetch it from [crates.io](https://crates.io). A `sha256`
 attribute is still needed for Nix purity.
 
-### Handling external dependencies
+### Handling external dependencies {#handling-external-dependencies}
 
 Some crates require external libraries. For crates from
 [crates.io](https://crates.io), such libraries can be specified in
@@ -624,7 +710,7 @@ with import <nixpkgs> {};
 }
 ```
 
-### Options and phases configuration
+### Options and phases configuration {#options-and-phases-configuration}
 
 Actually, the overrides introduced in the previous section are more
 general. A number of other parameters can be overridden:
@@ -671,7 +757,7 @@ general. A number of other parameters can be overridden:
   };
   ```
 
-### Features
+### Features {#features}
 
 One can also supply features switches. For example, if we want to
 compile `diesel_cli` only with the `postgres` feature, and no default
@@ -686,14 +772,15 @@ features, we would write:
 
 Where `diesel.nix` is the file generated by Carnix, as explained above.
 
+## Setting Up `nix-shell` {#setting-up-nix-shell}
 
-## Setting Up `nix-shell`
 Oftentimes you want to develop code from within `nix-shell`. Unfortunately
 `buildRustCrate` does not support common `nix-shell` operations directly
 (see [this issue](https://github.com/NixOS/nixpkgs/issues/37945))
 so we will use `stdenv.mkDerivation` instead.
 
 Using the example `hello` project above, we want to do the following:
+
 - Have access to `cargo` and `rustc`
 - Have the `openssl` library available to a crate through it's _normal_
   compilation mechanism (`pkg-config`).
@@ -722,13 +809,15 @@ stdenv.mkDerivation {
 ```
 
 You should now be able to run the following:
-```ShellSesssion
+
+```ShellSession
 $ nix-shell --pure
 $ cargo build
 $ cargo test
 ```
 
-### Controlling Rust Version Inside `nix-shell`
+### Controlling Rust Version Inside `nix-shell` {#controlling-rust-version-inside-nix-shell}
+
 To control your rust version (i.e. use nightly) from within `shell.nix` (or
 other nix expressions) you can use the following `shell.nix`
 
@@ -760,6 +849,7 @@ stdenv.mkDerivation {
 ```
 
 Now run:
+
 ```ShellSession
 $ rustc --version
 rustc 1.26.0-nightly (188e693b3 2018-03-26)
@@ -767,31 +857,32 @@ rustc 1.26.0-nightly (188e693b3 2018-03-26)
 
 To see that you are using nightly.
 
-
-## Using the Rust nightlies overlay
+## Using the Rust nightlies overlay {#using-the-rust-nightlies-overlay}
 
 Mozilla provides an overlay for nixpkgs to bring a nightly version of Rust into scope.
 This overlay can _also_ be used to install recent unstable or stable versions
 of Rust, if desired.
 
-### Rust overlay installation
+### Rust overlay installation {#rust-overlay-installation}
 
 You can use this overlay by either changing your local nixpkgs configuration,
 or by adding the overlay declaratively in a nix expression,  e.g. in `configuration.nix`.
-For more information see [#sec-overlays-install](the manual on installing overlays).
+For more information see [the manual on installing overlays](#sec-overlays-install).
 
-#### Imperative rust overlay installation
+#### Imperative rust overlay installation {#imperative-rust-overlay-installation}
 
 Clone [nixpkgs-mozilla](https://github.com/mozilla/nixpkgs-mozilla),
 and create a symbolic link to the file
 [rust-overlay.nix](https://github.com/mozilla/nixpkgs-mozilla/blob/master/rust-overlay.nix)
 in the `~/.config/nixpkgs/overlays` directory.
 
-    $ git clone https://github.com/mozilla/nixpkgs-mozilla.git
-    $ mkdir -p ~/.config/nixpkgs/overlays
-    $ ln -s $(pwd)/nixpkgs-mozilla/rust-overlay.nix ~/.config/nixpkgs/overlays/rust-overlay.nix
+```ShellSession
+$ git clone https://github.com/mozilla/nixpkgs-mozilla.git
+$ mkdir -p ~/.config/nixpkgs/overlays
+$ ln -s $(pwd)/nixpkgs-mozilla/rust-overlay.nix ~/.config/nixpkgs/overlays/rust-overlay.nix
+```
 
-### Declarative rust overlay installation
+### Declarative rust overlay installation {#declarative-rust-overlay-installation}
 
 Add the following to your `configuration.nix`, `home-configuration.nix`, `shell.nix`, or similar:
 
@@ -807,7 +898,7 @@ Add the following to your `configuration.nix`, `home-configuration.nix`, `shell.
 
 Note that this will fetch the latest overlay version when rebuilding your system.
 
-### Rust overlay usage
+### Rust overlay usage {#rust-overlay-usage}
 
 The overlay contains attribute sets corresponding to different versions of the rust toolchain, such as:
 
@@ -821,11 +912,15 @@ For example, you might want to add `latest.rustChannels.stable.rust` to the list
 
 Imperatively, the latest stable version can be installed with the following command:
 
-    $ nix-env -Ai nixpkgs.latest.rustChannels.stable.rust
+```ShellSession
+$ nix-env -Ai nixpkgs.latest.rustChannels.stable.rust
+```
 
 Or using the attribute with nix-shell:
 
-    $ nix-shell -p nixpkgs.latest.rustChannels.stable.rust
+```ShellSession
+$ nix-shell -p nixpkgs.latest.rustChannels.stable.rust
+```
 
 Substitute the `nixpkgs` prefix with `nixos` on NixOS.
 To install the beta or nightly channel, "stable" should be substituted by
diff --git a/nixpkgs/doc/languages-frameworks/texlive.section.md b/nixpkgs/doc/languages-frameworks/texlive.section.md
index c3028731f4e9..6b505cefcc95 100644
--- a/nixpkgs/doc/languages-frameworks/texlive.section.md
+++ b/nixpkgs/doc/languages-frameworks/texlive.section.md
@@ -5,6 +5,7 @@ Since release 15.09 there is a new TeX Live packaging that lives entirely under
 ## User's guide {#sec-language-texlive-user-guide}
 
 - For basic usage just pull `texlive.combined.scheme-basic` for an environment with basic LaTeX support.
+
 - It typically won't work to use separately installed packages together. Instead, you can build a custom set of packages like this:
 
   ```nix
@@ -14,6 +15,7 @@ Since release 15.09 there is a new TeX Live packaging that lives entirely under
   ```
 
 - There are all the schemes, collections and a few thousand packages, as defined upstream (perhaps with tiny differences).
+
 - By default you only get executables and files needed during runtime, and a little documentation for the core packages. To change that, you need to add `pkgFilter` function to `combine`.
 
   ```nix
diff --git a/nixpkgs/doc/languages-frameworks/titanium.section.md b/nixpkgs/doc/languages-frameworks/titanium.section.md
index 57360f034b9f..306ad8662767 100644
--- a/nixpkgs/doc/languages-frameworks/titanium.section.md
+++ b/nixpkgs/doc/languages-frameworks/titanium.section.md
@@ -9,8 +9,8 @@ applications for Android and iOS devices from source code.
 Not all Titanium features supported -- currently, it can only be used to build
 Android and iOS apps.
 
-Building a Titanium app
------------------------
+## Building a Titanium app {#building-a-titanium-app}
+
 We can build a Titanium app from source for Android or iOS and for debugging or
 release purposes by invoking the `titaniumenv.buildApp {}` function:
 
@@ -103,8 +103,8 @@ When `enableWirelessDistribution` has been enabled, you must also provide the
 path of the PHP script (`installURL`) (that is included with the iOS build
 environment) to enable wireless ad-hoc installations.
 
-Emulating or simulating the app
--------------------------------
+## Emulating or simulating the app {#emulating-or-simulating-the-app}
+
 It is also possible to simulate the correspond iOS simulator build by using
 `xcodeenv.simulateApp {}` and emulate an Android APK by using
 `androidenv.emulateApp {}`.
diff --git a/nixpkgs/doc/languages-frameworks/vim.section.md b/nixpkgs/doc/languages-frameworks/vim.section.md
index 5316db9a1375..e170591605cf 100644
--- a/nixpkgs/doc/languages-frameworks/vim.section.md
+++ b/nixpkgs/doc/languages-frameworks/vim.section.md
@@ -12,7 +12,7 @@ At the moment we support three different methods for managing plugins:
 - Pathogen
 - vim-plug
 
-## Custom configuration
+## Custom configuration {#custom-configuration}
 
 Adding custom .vimrc lines can be done using the following code:
 
@@ -56,7 +56,7 @@ neovim-qt.override {
 }
 ```
 
-## Managing plugins with Vim packages
+## Managing plugins with Vim packages {#managing-plugins-with-vim-packages}
 
 To store you plugins in Vim packages (the native Vim plugin manager, see `:help packages`) the following example can be used:
 
@@ -116,7 +116,7 @@ The resulting package can be added to `packageOverrides` in `~/.nixpkgs/config.n
 
 After that you can install your special grafted `myVim` or `myNeovim` packages.
 
-### What if your favourite Vim plugin isn't already packaged?
+### What if your favourite Vim plugin isn’t already packaged? {#what-if-your-favourite-vim-plugin-isnt-already-packaged}
 
 If one of your favourite plugins isn't packaged, you can package it yourself:
 
@@ -154,7 +154,7 @@ in
 }
 ```
 
-## Managing plugins with vim-plug
+## Managing plugins with vim-plug {#managing-plugins-with-vim-plug}
 
 To use [vim-plug](https://github.com/junegunn/vim-plug) to manage your Vim
 plugins the following example can be used:
@@ -183,14 +183,14 @@ neovim.override {
 }
 ```
 
-## Managing plugins with VAM
+## Managing plugins with VAM {#managing-plugins-with-vam}
 
-### Handling dependencies of Vim plugins
+### Handling dependencies of Vim plugins {#handling-dependencies-of-vim-plugins}
 
 VAM introduced .json files supporting dependencies without versioning
 assuming that "using latest version" is ok most of the time.
 
-### Example
+### Example {#example}
 
 First create a vim-scripts file having one plugin name per line. Example:
 
@@ -280,7 +280,7 @@ Sample output2:
 ]
 ```
 
-## Adding new plugins to nixpkgs
+## Adding new plugins to nixpkgs {#adding-new-plugins-to-nixpkgs}
 
 Nix expressions for Vim plugins are stored in [pkgs/misc/vim-plugins](/pkgs/misc/vim-plugins). For the vast majority of plugins, Nix expressions are automatically generated by running [`./update.py`](/pkgs/misc/vim-plugins/update.py). This creates a [generated.nix](/pkgs/misc/vim-plugins/generated.nix) file based on the plugins listed in [vim-plugin-names](/pkgs/misc/vim-plugins/vim-plugin-names). Plugins are listed in alphabetical order in `vim-plugin-names` using the format `[github username]/[repository]`. For example https://github.com/scrooloose/nerdtree becomes `scrooloose/nerdtree`.
 
@@ -298,7 +298,7 @@ To add a new plugin, run `./update.py --add "[owner]/[name]"`. **NOTE**: This sc
 
 Finally, there are some plugins that are also packaged in nodePackages because they have Javascript-related build steps, such as running webpack. Those plugins are not listed in `vim-plugin-names` or managed by `update.py` at all, and are included separately in `overrides.nix`. Currently, all these plugins are related to the `coc.nvim` ecosystem of Language Server Protocol integration with vim/neovim.
 
-## Updating plugins in nixpkgs
+## Updating plugins in nixpkgs {#updating-plugins-in-nixpkgs}
 
 Run the update script with a GitHub API token that has at least `public_repo` access. Running the script without the token is likely to result in rate-limiting (429 errors). For steps on creating an API token, please refer to [GitHub's token documentation](https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/creating-a-personal-access-token).
 
@@ -312,7 +312,7 @@ Alternatively, set the number of processes to a lower count to avoid rate-limiti
 ./pkgs/misc/vim-plugins/update.py --proc 1
 ```
 
-## Important repositories
+## Important repositories {#important-repositories}
 
 - [vim-pi](https://bitbucket.org/vimcommunity/vim-pi) is a plugin repository
   from VAM plugin manager meant to be used by others as well used by