1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-26 20:01:15 +02:00

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-13 12:43:46 -05:00
parent 087be7281a
commit 1d757292d0
No known key found for this signature in database
GPG key ID: 5C0BD6957D86FE27
5 changed files with 158 additions and 38 deletions

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);