1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-12 21:46:01 +01:00
nix/src/libfetchers-c/nix_api_fetchers.cc
Robert Hensing 60bffbd41b nix-fetchers-c: Init with settings object
Also make it a dependency of nix-flake-c; we'll need that.
2025-04-02 18:29:42 +02:00

19 lines
512 B
C++

#include "nix_api_fetchers.h"
#include "nix_api_fetchers_internal.hh"
#include "nix_api_util_internal.h"
nix_fetchers_settings * nix_fetchers_settings_new(nix_c_context * context)
{
try {
auto fetchersSettings = nix::make_ref<nix::fetchers::Settings>(nix::fetchers::Settings{});
return new nix_fetchers_settings{
.settings = fetchersSettings,
};
}
NIXC_CATCH_ERRS_NULL
}
void nix_fetchers_settings_free(nix_fetchers_settings * settings)
{
delete settings;
}