expr_eval_from_string

Function expr_eval_from_string 

Source
pub unsafe extern "C" fn expr_eval_from_string(
    context: *mut c_context,
    state: *mut EvalState,
    expr: *const c_char,
    path: *const c_char,
    value: *mut value,
) -> err
Expand description

@brief Parses and evaluates a Nix expression from a string. @ingroup value_create

@param[out] context Optional, stores error information @param[in] state The state of the evaluation. @param[in] expr The Nix expression to parse. @param[in] path The file path to associate with the expression. This is required for expressions that contain relative paths (such as ./.) that are resolved relative to the given directory. @param[out] value The result of the evaluation. You must allocate this yourself. @return NIX_OK if the evaluation was successful, an error code otherwise.