derivation_from_json

Function derivation_from_json 

Source
pub unsafe extern "C" fn derivation_from_json(
    context: *mut c_context,
    store: *mut Store,
    json: *const c_char,
) -> *mut derivation
Expand description

@brief Create a nix_derivation from a JSON representation of that derivation.

@note Unlike nix_derivation_to_json, this needs a Store. This is because over time we expect the internal representation of derivations in Nix to differ from accepted derivation formats. The store argument is here to help any logic needed to convert from JSON to the internal representation, in excess of just parsing.

@param[out] context Optional, stores error information. @param[in] store nix store reference. @param[in] json JSON of the derivation as a string. @return A new derivation, or NULL on error. Free with nix_derivation_free when done using the nix_derivation.