mirror of
https://github.com/NixOS/nix
synced 2025-06-26 15:51:15 +02:00
parent
3ac9d74eb1
commit
8914e01e37
3 changed files with 25 additions and 46 deletions
|
@ -449,7 +449,8 @@ std::optional<const Realisation> BinaryCacheStore::queryRealisation(const DrvOut
|
|||
auto rawOutputInfo = getFile(outputInfoFilePath);
|
||||
|
||||
if (rawOutputInfo) {
|
||||
return { Realisation::parse(*rawOutputInfo, outputInfoFilePath) };
|
||||
return {Realisation::fromJSON(
|
||||
nlohmann::json::parse(*rawOutputInfo), outputInfoFilePath)};
|
||||
} else {
|
||||
return std::nullopt;
|
||||
}
|
||||
|
@ -457,7 +458,7 @@ std::optional<const Realisation> BinaryCacheStore::queryRealisation(const DrvOut
|
|||
|
||||
void BinaryCacheStore::registerDrvOutput(const Realisation& info) {
|
||||
auto filePath = realisationsPrefix + "/" + info.id.to_string() + ".doi";
|
||||
upsertFile(filePath, info.to_string(), "text/x-nix-derivertopath");
|
||||
upsertFile(filePath, info.toJSON(), "application/json");
|
||||
}
|
||||
|
||||
ref<FSAccessor> BinaryCacheStore::getFSAccessor()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue