Nix 2.17.0
Nix, the purely functional package manager; stable external interfaces
Loading...
Searching...
No Matches
nix_api_store.h
Go to the documentation of this file.
1#ifndef NIX_API_STORE_H
2#define NIX_API_STORE_H
14#include "nix_api_util.h"
15#include <stdbool.h>
16
17#ifdef __cplusplus
18extern "C" {
19#endif
20// cffi start
21
23typedef struct Store Store;
25typedef struct StorePath StorePath;
26
37
48
58Store *nix_store_open(nix_c_context *, const char *uri, const char ***params);
59
68
77nix_err nix_store_get_uri(nix_c_context *context, Store *store, char *dest,
78 unsigned int n);
79
80// returns: owned StorePath*
91 const char *path);
92
99
108 StorePath *path);
109// nix_err nix_store_ensure(Store*, const char*);
110// nix_err nix_store_build_paths(Store*);
123 void *userdata,
124 void (*cb)(void *userdata, const char *outname,
125 const char *out));
126
136 unsigned int n);
137
138// cffi end
139#ifdef __cplusplus
140}
141#endif
145#endif // NIX_API_STORE_H
int nix_err
Type for error codes in the NIX system.
Definition: nix_api_util.h:59
bool nix_store_is_valid_path(nix_c_context *context, Store *store, StorePath *path)
check if a storepath is valid (exists in the store)
void nix_store_unref(Store *store)
Unref a nix store.
nix_err nix_init_plugins(nix_c_context *context)
Loads plugins specified in the settings.
nix_err nix_libstore_init(nix_c_context *context)
Initializes the Nix store library.
struct Store Store
reference to a nix store
Definition: nix_api_store.h:23
nix_err nix_store_get_version(nix_c_context *, Store *store, char *dest, unsigned int n)
get the version of a nix store
Store * nix_store_open(nix_c_context *, const char *uri, const char ***params)
Open a nix store.
struct StorePath StorePath
nix store path
Definition: nix_api_store.h:25
void nix_store_path_free(StorePath *p)
Deallocate a nix StorePath.
StorePath * nix_store_parse_path(nix_c_context *context, Store *store, const char *path)
parse a nix store path into a StorePath
nix_err nix_store_get_uri(nix_c_context *context, Store *store, char *dest, unsigned int n)
get the URI of a nix store
nix_err nix_store_build(nix_c_context *context, Store *store, StorePath *path, void *userdata, void(*cb)(void *userdata, const char *outname, const char *out))
Build a nix store path.
Main entry for the libutil C bindings.
This object stores error state.