Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/libstore-test-support/test-main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ int testMainForBuidingPre(int argc, char ** argv)
// sandboxBuildDir = /build
// However, we have a rule that the store dir must not be inside the storeDir, so we need to pick a different
// sandboxBuildDir.
settings.sandboxBuildDir = "/test-build-dir-instead-of-usual-build-dir";
settings.getLocalSettings().sandboxBuildDir = "/test-build-dir-instead-of-usual-build-dir";
#endif

#ifdef __APPLE__
// Avoid this error, when already running in a sandbox:
// sandbox-exec: sandbox_apply: Operation not permitted
settings.sandboxMode = smDisabled;
settings.getLocalSettings().sandboxMode = smDisabled;
setEnv("_NIX_TEST_NO_SANDBOX", "1");
#endif

Expand Down
3 changes: 2 additions & 1 deletion src/libstore/build/derivation-building-goal.cc
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,8 @@ Goal::Co DerivationBuildingGoal::buildLocally(
}
};

decltype(DerivationBuilderParams::defaultPathsInChroot) defaultPathsInChroot = settings.sandboxPaths.get();
decltype(DerivationBuilderParams::defaultPathsInChroot) defaultPathsInChroot =
localStore.config->getLocalSettings().sandboxPaths.get();
DesugaredEnv desugaredEnv;

/* Add the closure of store paths to the chroot. */
Expand Down
2 changes: 1 addition & 1 deletion src/libstore/build/worker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ void Worker::waitForInput()
auto nearest = steady_time_point::max(); // nearest deadline

auto localStore = dynamic_cast<LocalStore *>(&store);
if (localStore && localStore->config->getGCSettings().minFree.get() != 0)
if (localStore && localStore->config->getLocalSettings().getGCSettings().minFree.get() != 0)
// If we have a local store (and thus are capable of automatically collecting garbage) and configured to do so,
// periodically wake up to see if we need to run the garbage collector. (See the `autoGC` call site above in
// this file, also gated on having a local store. when we wake up, we intended to reach that call site.)
Expand Down
4 changes: 2 additions & 2 deletions src/libstore/gc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ struct GCLimitReached

void LocalStore::collectGarbage(const GCOptions & options, GCResults & results)
{
const auto & gcSettings = config->getGCSettings();
const auto & gcSettings = config->getLocalSettings().getGCSettings();

bool shouldDelete = options.action == GCOptions::gcDeleteDead || options.action == GCOptions::gcDeleteSpecific;
bool keepOutputs = gcSettings.keepOutputs;
Expand Down Expand Up @@ -918,7 +918,7 @@ void LocalStore::collectGarbage(const GCOptions & options, GCResults & results)
void LocalStore::autoGC(bool sync)
{
#if HAVE_STATVFS
const auto & gcSettings = config->getGCSettings();
const auto & gcSettings = config->getLocalSettings().getGCSettings();

static auto fakeFreeSpaceFile = getEnv("_NIX_TEST_FREE_SPACE_FILE");

Expand Down
Loading
Loading