mirror of
https://github.com/NixOS/nix.git
synced 2025-11-30 22:20:59 +01:00
Store a ref to InputAccessor in SourcePath
This commit is contained in:
parent
72dffd6c6c
commit
a18b3c665a
14 changed files with 44 additions and 31 deletions
|
|
@ -768,7 +768,7 @@ SourcePath EvalState::findFile(SearchPath & searchPath, const std::string_view p
|
|||
}
|
||||
|
||||
if (hasPrefix(path, "nix/"))
|
||||
return {*corepkgsFS, CanonPath(path.substr(3))};
|
||||
return {corepkgsFS, CanonPath(path.substr(3))};
|
||||
|
||||
debugThrowLastTrace(ThrownError({
|
||||
.msg = hintfmt(evalSettings.pureEval
|
||||
|
|
@ -791,7 +791,8 @@ SourcePath EvalState::findFile(SearchPath & searchPath, const std::string_view p
|
|||
try {
|
||||
auto storePath = fetchers::downloadTarball(
|
||||
store, resolveUri(elem.second), "source", false).first.storePath;
|
||||
auto & accessor = registerAccessor(makeFSInputAccessor(CanonPath(store->toRealPath(storePath))));
|
||||
auto accessor = makeFSInputAccessor(CanonPath(store->toRealPath(storePath)));
|
||||
registerAccessor(accessor);
|
||||
res.emplace(SourcePath {accessor, CanonPath::root});
|
||||
} catch (FileTransferError & e) {
|
||||
logWarning({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue