mirror of
https://github.com/NixOS/nix
synced 2025-06-28 17:51:15 +02:00
Merge pull request #11914 from roberth/evalstate-get-builtins
EvalState::getBuiltins
This commit is contained in:
commit
32becc87fe
6 changed files with 57 additions and 6 deletions
|
@ -623,8 +623,19 @@ private:
|
|||
|
||||
public:
|
||||
|
||||
/**
|
||||
* Retrieve a specific builtin, equivalent to evaluating `builtins.${name}`.
|
||||
* @param name The attribute name of the builtin to retrieve.
|
||||
* @throws EvalError if the builtin does not exist.
|
||||
*/
|
||||
Value & getBuiltin(const std::string & name);
|
||||
|
||||
/**
|
||||
* Retrieve the `builtins` attrset, equivalent to evaluating the reference `builtins`.
|
||||
* Always returns an attribute set value.
|
||||
*/
|
||||
Value & getBuiltins();
|
||||
|
||||
struct Doc
|
||||
{
|
||||
Pos pos;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue