Skip to content

Commit

Permalink
docs: fixup description of builtins.importNative
Browse files Browse the repository at this point in the history
There was an argument missing and the fact that the imported function is
called.
  • Loading branch information
Mic92 committed Jun 3, 2024
1 parent ef5c846 commit b2cd358
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/libexpr/eval-settings.hh
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,18 @@ struct EvalSettings : Config
Enable built-in functions that allow executing native code.
In particular, this adds:
- `builtins.importNative` *path*
Load a dynamic shared object (DSO) at *path* which exposes a function pointer to a procedure that initialises a Nix language value, and return that value.
The procedure must have the following signature:
- `builtins.importNative` *path* *symbol*
Opens dynamic shared object (DSO) at *path*, loads the function with the symbol name *symbol* from it and runs it.
The loaded function must have the following signature:
```cpp
extern "C" typedef void (*ValueInitialiser) (EvalState & state, Value & v);
```
```
The [Nix C++ API documentation](@docroot@/contributing/documentation.md#api-documentation) has more details on evaluator internals.
- `builtins.exec` *arguments*
Execute a program, where *arguments* are specified as a list of strings, and parse its output as a Nix expression.
)"};

Expand Down

0 comments on commit b2cd358

Please sign in to comment.