mirror of
https://github.com/NixOS/nix.git
synced 2025-11-20 09:19:36 +01:00
Use PathReferences more widely
This commit is contained in:
parent
dae4409071
commit
f8d562c0a7
29 changed files with 431 additions and 205 deletions
|
|
@ -71,14 +71,20 @@ DownloadFileResult downloadFile(
|
|||
dumpString(*res.data, sink);
|
||||
auto hash = hashString(htSHA256, *res.data);
|
||||
ValidPathInfo info {
|
||||
store->makeFixedOutputPath(FileIngestionMethod::Flat, hash, name),
|
||||
*store,
|
||||
{
|
||||
.name = name,
|
||||
.info = FixedOutputInfo {
|
||||
{
|
||||
.method = FileIngestionMethod::Flat,
|
||||
.hash = hash,
|
||||
},
|
||||
{},
|
||||
},
|
||||
},
|
||||
hashString(htSHA256, *sink.s),
|
||||
};
|
||||
info.narSize = sink.s->size();
|
||||
info.ca = FixedOutputHash {
|
||||
.method = FileIngestionMethod::Flat,
|
||||
.hash = hash,
|
||||
};
|
||||
auto source = StringSource { *sink.s };
|
||||
store->addToStore(info, source, NoRepair, NoCheckSigs);
|
||||
storePath = std::move(info.path);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue