about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJörg Thalheim <Mic92@users.noreply.github.com>2018-11-26 11:54:23 +0000
committerGitHub <noreply@github.com>2018-11-26 11:54:23 +0000
commit3324503824b76d32a5bb67994b66372535b92076 (patch)
tree4665de8e6930369f3f1c540ef0d0b25176879776
parent5229c876f8df4fbeb0bfaf328c01e0b32071bfab (diff)
downloadnixlib-3324503824b76d32a5bb67994b66372535b92076.tar
nixlib-3324503824b76d32a5bb67994b66372535b92076.tar.gz
nixlib-3324503824b76d32a5bb67994b66372535b92076.tar.bz2
nixlib-3324503824b76d32a5bb67994b66372535b92076.tar.lz
nixlib-3324503824b76d32a5bb67994b66372535b92076.tar.xz
nixlib-3324503824b76d32a5bb67994b66372535b92076.tar.zst
nixlib-3324503824b76d32a5bb67994b66372535b92076.zip
doc: add example usage for breakpointHook (#51005)
-rw-r--r--doc/stdenv.xml12
1 files changed, 11 insertions, 1 deletions
diff --git a/doc/stdenv.xml b/doc/stdenv.xml
index 208b5e9cf302..40ff17aafa09 100644
--- a/doc/stdenv.xml
+++ b/doc/stdenv.xml
@@ -2455,7 +2455,17 @@ addEnvHooks "$hostOffset" myBashFunction
        use the cntr exec subcommand. Note that <command>cntr</command> also
        needs to be executed on the machine that is doing the build, which might
        be not the case when remote builders are enabled.
-       <command>cntr</command> is only supported on linux based platforms.
+       <command>cntr</command> is only supported on Linux-based platforms. To
+       use it first add <literal>cntr</literal> to your
+       <literal>environment.systemPackages</literal> on NixOS or alternatively to
+       the root user on non-NixOS systems. Then in the package that is supposed
+       to be inspected, add <literal>breakpointHook</literal> to
+       <literal>nativeBuildInputs</literal>.
+<programlisting>
+         nativeBuildInputs = [ breakpointHook ];
+       </programlisting>
+       When a build failure happens there will be an instruction printed that
+       shows how to attach with <literal>cntr</literal> to the build sandbox.
       </para>
      </listitem>
     </varlistentry>