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:
parent
c7f8147282
commit
012453d1e6
7 changed files with 84 additions and 35 deletions
|
@ -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};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue