Add builtins.getContext.

This can be very helpful when debugging, as well as enabling complex
black magic like surgically removing a single dependency from a
string's context.
This commit is contained in:
Shea Levy
2019-01-14 11:27:10 -05:00
parent 087be7281a
commit 1d757292d0
5 changed files with 158 additions and 38 deletions
+3
View File
@@ -316,6 +316,9 @@ private:
/* Return a string representing the type of the value `v'. */
string showType(const Value & v);
/* Decode a context string !<name>!<path> into a pair <path,
name>. */
std::pair<string, string> decodeContext(const string & s);
/* If `path' refers to a directory, then append "/default.nix". */
Path resolveExprPath(Path path);