Is your feature request related to a problem?
If a build fails, it is very useful to be able to enter the build environment and troubleshoot it interactively. As far as I can tell, the only way to do this right now is by adding nixpkgs' special package breakpointHook to the nativeBuildInputs of a troublesome derivation. Doing this may be quite difficult, especially for inexperienced Nixpkgs developers, and it also perturbs the build environment in a way that could potentially mask the problem (since there are additional packages visible to the build).
The nix3 build subcommand has an option --debugger which allows interactive debugging of a failed Nix expression evaluation, but this doesn't help with a failed build, and it's not, as far as I can tell, available to traditional nix commands.
Proposed solution
- Add the
--debugger option to all the traditional nix commands.
- Expand the functionality of
--debugger to include an effect akin to the effect of adding breakpointHook to nativeBuildInputs, but, crucially, without requiring modification of the derivation or perturbing the build environment.
Checklist
Add 👍 to issues you find important.
Is your feature request related to a problem?
If a build fails, it is very useful to be able to enter the build environment and troubleshoot it interactively. As far as I can tell, the only way to do this right now is by adding nixpkgs' special package
breakpointHookto thenativeBuildInputsof a troublesome derivation. Doing this may be quite difficult, especially for inexperienced Nixpkgs developers, and it also perturbs the build environment in a way that could potentially mask the problem (since there are additional packages visible to the build).The nix3
buildsubcommand has an option--debuggerwhich allows interactive debugging of a failed Nix expression evaluation, but this doesn't help with a failed build, and it's not, as far as I can tell, available to traditional nix commands.Proposed solution
--debuggeroption to all the traditional nix commands.--debuggerto include an effect akin to the effect of addingbreakpointHooktonativeBuildInputs, but, crucially, without requiring modification of the derivation or perturbing the build environment.Checklist
Add 👍 to issues you find important.