From 40d2bc90f19473cf8f0c4e72561687ca3685a888 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Fri, 31 May 2024 08:18:52 +0200 Subject: [PATCH] docs: fixup description of builtins.importNative Follow up documentation fix. Change-Id: I135c2c323ad550c95d27ef854b7db334b851f29c --- src/libexpr/eval-settings.hh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libexpr/eval-settings.hh b/src/libexpr/eval-settings.hh index dbfc3b2c7767..e54273f64992 100644 --- a/src/libexpr/eval-settings.hh +++ b/src/libexpr/eval-settings.hh @@ -19,9 +19,9 @@ 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. + - `builtins.importNative` *path* *symbol* + Runs function with *symbol* from a dynamic shared object (DSO) at *path*. + This may be used to add new builtins to the Nix language. The procedure must have the following signature: ```cpp extern "C" typedef void (*ValueInitialiser) (EvalState & state, Value & v);