mirror of
https://github.com/NixOS/nix.git
synced 2025-11-27 20:51:00 +01:00
fetchToStore(): Fix caching
This was broken because MountedSourceAccessor did not return a fingerprint. Previously fingerprints were global to an accessor, but with a MountedSourceAccessor the fingerprint can be different for each mount point.
This commit is contained in:
parent
f8ef941c04
commit
86785fd9d1
8 changed files with 72 additions and 9 deletions
|
|
@ -80,6 +80,7 @@ StorePath EvalState::mountInput(
|
|||
storeFS->mount(CanonPath(store->printStorePath(storePath)), accessor);
|
||||
|
||||
if (requireLockable && (!settings.lazyTrees || !input.isLocked()) && !input.getNarHash()) {
|
||||
// FIXME: use fetchToStore to make it cache this
|
||||
auto narHash = accessor->hashPath(CanonPath::root);
|
||||
input.attrs.insert_or_assign("narHash", narHash.to_string(HashFormat::SRI, true));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue