1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-26 11:41:15 +02:00

Make the store directory a member variable of Store

This commit is contained in:
Eelco Dolstra 2016-06-01 14:49:12 +02:00
parent 1b5b654fe2
commit 7850d3d279
35 changed files with 315 additions and 296 deletions

View file

@ -341,7 +341,7 @@ Path EvalState::checkSourcePath(const Path & path_)
/* To support import-from-derivation, allow access to anything in
the store. FIXME: only allow access to paths that have been
constructed by this evaluation. */
if (isInStore(path)) return path;
if (store->isInStore(path)) return path;
#if 0
/* Hack to support the chroot dependencies of corepkgs (see
@ -1517,7 +1517,7 @@ string EvalState::copyPathToStore(PathSet & context, const Path & path)
dstPath = srcToStore[path];
else {
dstPath = settings.readOnlyMode
? computeStorePathForPath(checkSourcePath(path)).first
? store->computeStorePathForPath(checkSourcePath(path)).first
: store->addToStore(baseNameOf(path), checkSourcePath(path), true, htSHA256, defaultPathFilter, repair);
srcToStore[path] = dstPath;
printMsg(lvlChatty, format("copied source %1% -> %2%")