Commit e42a5c78 authored by pennae's avatar pennae
Browse files

doc: make sure section depths are consecutive

skipping heading levels (eg from # to ###, or starting at ###) is legal
in pandoc, but not in nixos-render-docs. pandoc acts as though section
levels *were* consecutive, nixos-render-docs prefers to tell people not
to do that kind of thing because it can make documents more fragile.
parent 830f5b33
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@ pkgs.makeSetupHook {
} ./script.sh
```

#### setup hook that depends on the hello package and runs hello and @shell@ is substituted with path to bash {#sec-pkgs.makeSetupHook-usage-example}
### setup hook that depends on the hello package and runs hello and @shell@ is substituted with path to bash {#sec-pkgs.makeSetupHook-usage-example}

```nix
pkgs.makeSetupHook {
+1 −2
Original line number Diff line number Diff line

### Autoconf {#setup-hook-autoconf}
# Autoconf {#setup-hook-autoconf}

The `autoreconfHook` derivation adds `autoreconfPhase`, which runs autoreconf, libtoolize and automake, essentially preparing the configure script in autotools-based builds. Most autotools-based packages come with the configure script pre-generated, but this hook is necessary for a few packages and when you need to patch the package’s configure scripts.
+1 −2
Original line number Diff line number Diff line

### Automake {#setup-hook-automake}
# Automake {#setup-hook-automake}

Adds the `share/aclocal` subdirectory of each build input to the `ACLOCAL_PATH` environment variable.
+1 −2
Original line number Diff line number Diff line

### autoPatchelfHook {#setup-hook-autopatchelfhook}
# autoPatchelfHook {#setup-hook-autopatchelfhook}

This is a special setup hook which helps in packaging proprietary software in that it automatically tries to find missing shared library dependencies of ELF files based on the given `buildInputs` and `nativeBuildInputs`.

+1 −2
Original line number Diff line number Diff line

### breakpointHook {#breakpointhook}
# breakpointHook {#breakpointhook}

This hook will make a build pause instead of stopping when a failure happens. It prevents nix from cleaning up the build environment immediately and allows the user to attach to a build environment using the `cntr` command. Upon build error it will print instructions on how to use `cntr`, which can be used to enter the environment for debugging. Installing cntr and running the command will provide shell access to the build sandbox of failed build. At `/var/lib/cntr` the sandboxed filesystem is mounted. All commands and files of the system are still accessible within the shell. To execute commands from the sandbox use the cntr exec subcommand. `cntr` is only supported on Linux-based platforms. To use it first add `cntr` to your `environment.systemPackages` on NixOS or alternatively to the root user on non-NixOS systems. Then in the package that is supposed to be inspected, add `breakpointHook` to `nativeBuildInputs`.

Loading