1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-29 14:53:16 +02:00

Move the input cache into libfetchers

This commit is contained in:
Eelco Dolstra 2025-04-09 22:11:36 +02:00
parent c7f8147282
commit 012453d1e6
7 changed files with 84 additions and 35 deletions

View file

@ -7,6 +7,7 @@
#include "nix_api_fetchers.h"
#include "nix/flake/flake.hh"
#include "nix/fetchers/input-cache.hh"
nix_flake_settings * nix_flake_settings_new(nix_c_context * context)
{
@ -177,6 +178,7 @@ nix_locked_flake * nix_flake_lock(
{
nix_clear_err(context);
try {
nix::fetchers::InputCache::getCache()->clear();
auto lockedFlake = nix::make_ref<nix::flake::LockedFlake>(nix::flake::lockFlake(
*flakeSettings->settings, eval_state->state, *flakeReference->flakeRef, *flags->lockFlags));
return new nix_locked_flake{lockedFlake};