Export realiseContext in libnixexpr
Useful for importNative plugins
This commit is contained in:
parent
bca6d35636
commit
d16e3c7f09
2 changed files with 11 additions and 9 deletions
|
@ -336,5 +336,13 @@ string showType(const Value & v);
|
||||||
/* If `path' refers to a directory, then append "/default.nix". */
|
/* If `path' refers to a directory, then append "/default.nix". */
|
||||||
Path resolveExprPath(Path path);
|
Path resolveExprPath(Path path);
|
||||||
|
|
||||||
|
struct InvalidPathError : EvalError
|
||||||
|
{
|
||||||
|
Path path;
|
||||||
|
InvalidPathError(const Path & path);
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Realise all paths in `context' */
|
||||||
|
void realiseContext(const PathSet & context);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,16 +39,10 @@ std::pair<string, string> decodeContext(const string & s)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
struct InvalidPathError : EvalError
|
InvalidPathError::InvalidPathError(const Path & path) :
|
||||||
{
|
EvalError(format("path ‘%1%’ is not valid") % path), path(path) {}
|
||||||
Path path;
|
|
||||||
InvalidPathError(const Path & path) :
|
|
||||||
EvalError(format("path ‘%1%’ is not valid") % path), path(path) {};
|
|
||||||
~InvalidPathError() throw () { };
|
|
||||||
};
|
|
||||||
|
|
||||||
|
void realiseContext(const PathSet & context)
|
||||||
static void realiseContext(const PathSet & context)
|
|
||||||
{
|
{
|
||||||
PathSet drvs;
|
PathSet drvs;
|
||||||
for (auto & i : context) {
|
for (auto & i : context) {
|
||||||
|
|
Loading…
Reference in a new issue