about summary refs log tree commit diff
path: root/src/libexpr/eval.hh
diff options
context:
space:
mode:
authorShea Levy <shea@shealevy.com>2019-01-13T17·43-0500
committerShea Levy <shea@shealevy.com>2019-01-14T16·27-0500
commit1d757292d0cb78beec32fcdfe15c2944a4bc4a95 (patch)
tree7c704f46212eb988db98e426b1043d4bc36ab1c7 /src/libexpr/eval.hh
parent087be7281a02a6d0e548ae56b910771837023d21 (diff)
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.
Diffstat (limited to 'src/libexpr/eval.hh')
-rw-r--r--src/libexpr/eval.hh3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libexpr/eval.hh b/src/libexpr/eval.hh
index d0f298e168e9..9fe3878916d5 100644
--- a/src/libexpr/eval.hh
+++ b/src/libexpr/eval.hh
@@ -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);