mirror of
https://github.com/NixOS/nix.git
synced 2025-11-15 06:52:43 +01:00
nix-fetchers-c: Init with settings object
Also make it a dependency of nix-flake-c; we'll need that.
This commit is contained in:
parent
1061a0965a
commit
60bffbd41b
17 changed files with 213 additions and 0 deletions
19
src/libfetchers-c/nix_api_fetchers.cc
Normal file
19
src/libfetchers-c/nix_api_fetchers.cc
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
#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;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue