The C API provides nix_eval_state_builder_load as a separate function
to allow controlling whether settings are loaded from the environment.
Add load_ambient_settings() method to expose this control, with the
default being to load them (needed in some situations to allow path
coercion to work).
Creating a crate for bwd-gc highlights the fact that it would be nice to
fix 2!
The file blocklist is a lost less unmaintainable then the more
fine-grained one we had before.
Fix#9
Without this call, settings from the global Nix configuration are never
loaded, leaving readOnlyMode = true (the default). This prevents Nix
from adding paths to the store during evaluation, causing errors like:
error: path '/some/local/path' does not exist
This fix loads global settings before creating the EvalState, enabling
path coercion for local file references.
The previous "See underlying function" text didn't provide a way to
find the underlying function, forcing users to search the codebase.
Stating the safety contracts explicitly makes the API usable.