From 0f9653f7ed83494630f8a024a4ca219ed882ec7f Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Mon, 6 May 2019 16:42:34 +0200 Subject: doc/stdenv: put note about remote builds with breakpointHook into a With remote builds, the sandbox can't be accessed by `cntr` as it is on a different machine. I decided to put this into an extra `note` block as it took me admittedly too much time to figure this out. --- doc/stdenv.xml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'doc/stdenv.xml') diff --git a/doc/stdenv.xml b/doc/stdenv.xml index 0435362306ba..63e6450860ac 100644 --- a/doc/stdenv.xml +++ b/doc/stdenv.xml @@ -2643,9 +2643,7 @@ addEnvHooks "$hostOffset" myBashFunction 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. Note that cntr also needs to be executed - on the machine that is doing the build, which might not be the case when - remote builders are enabled. cntr is only supported + 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 @@ -2657,6 +2655,16 @@ addEnvHooks "$hostOffset" myBashFunction When a build failure happens there will be an instruction printed that shows how to attach with cntr to the build sandbox. + + Caution with remote builds + + This won't work with remote builds as the build environment is on + a different machine and can't be accessed by cntr. + Remote builds can be turned off by setting --option builders '' + for nix-build or --builders '' for + nix build. + + -- cgit 1.4.1