NixOS/nix — pull request #250 by shlevy (2014-05-07 20:04:59+00:00)
Title: Declarative nix path

This adds a `builtins.importWithSettings` primop that allows specifying settings (as an attrset) for the import. The only currently recognized setting is `nix-path`, which is a list of attrsets with an optional `prefix` attr and a required `value` attr. It also adds a `__curSettings` symbol to access the settings associated with the current parse.

In order to propagate the settings properly, `import` was changed from a primop to syntax sugar. This will break usage of `builtins.import`, so we can add a dummy primop that fails to propagate the settings (perhaps with a warning printed) if this is a problem (but I doubt anyone actually uses this).