As I understand nix-shell just creates environment in terms of available environment variables.
Is it possible to start shell environment with sandboxed file system (nix-build like)?
I’ve tried buildFHSEnv, but it keeps many folders at / from the system environment and I’ve seen comments that it wasn’t exactly designed to create completely sandboxed file system environment.
Isn’t usually a problem for debugging failed builds or there is some workaround?
E.g. when nix-build --keep-failed is failed and user goes to investigate what happened to the build directory and even if they use nix-shell --pure package.nix they will be debugging in a sllightly different environment than was used for the build, since file system is not sandboxed and system dependencies may get in the way.