mirror of
https://github.com/NixOS/nix.git
synced 2024-11-26 00:32:28 +00:00
nix_api_store: add nix_init_plugins
This commit is contained in:
parent
dc0f7d8f96
commit
df9401eb4e
@ -20,6 +20,15 @@ nix_err nix_libstore_init(nix_c_context *context) {
|
|||||||
NIXC_CATCH_ERRS
|
NIXC_CATCH_ERRS
|
||||||
}
|
}
|
||||||
|
|
||||||
|
nix_err nix_init_plugins(nix_c_context *context) {
|
||||||
|
if (context)
|
||||||
|
context->last_err_code = NIX_OK;
|
||||||
|
try {
|
||||||
|
nix::initPlugins();
|
||||||
|
}
|
||||||
|
NIXC_CATCH_ERRS
|
||||||
|
}
|
||||||
|
|
||||||
Store *nix_store_open(nix_c_context *context, const char *uri,
|
Store *nix_store_open(nix_c_context *context, const char *uri,
|
||||||
const char ***params) {
|
const char ***params) {
|
||||||
if (context)
|
if (context)
|
||||||
|
@ -35,6 +35,17 @@ typedef struct StorePath StorePath;
|
|||||||
*/
|
*/
|
||||||
nix_err nix_libstore_init(nix_c_context *context);
|
nix_err nix_libstore_init(nix_c_context *context);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Loads plugins specified in the settings
|
||||||
|
*
|
||||||
|
* Call this once, after calling your desired init functions and setting
|
||||||
|
* relevant settings.
|
||||||
|
*
|
||||||
|
* @param[out] context Optional, stores error information
|
||||||
|
* @return NIX_OK if the initialization was successful, an error code otherwise.
|
||||||
|
*/
|
||||||
|
nix_err nix_init_plugins(nix_c_context *context);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Open a nix store
|
* @brief Open a nix store
|
||||||
* @param[out] context Optional, stores error information
|
* @param[out] context Optional, stores error information
|
||||||
|
Loading…
Reference in New Issue
Block a user