1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-01 04:18:00 +02:00

Store the realisations as JSON in the binary cache

Fix #4332
This commit is contained in:
regnat 2020-12-08 21:07:52 +01:00 committed by Théophane Hufschmitt
parent 3ac9d74eb1
commit 8914e01e37
3 changed files with 25 additions and 46 deletions

View file

@ -1,6 +1,7 @@
#pragma once
#include "path.hh"
#include <nlohmann/json_fwd.hpp>
namespace nix {
@ -25,8 +26,8 @@ struct Realisation {
DrvOutput id;
StorePath outPath;
std::string to_string() const;
static Realisation parse(const std::string & s, const std::string & whence);
nlohmann::json toJSON() const;
static Realisation fromJSON(const nlohmann::json& json, const std::string& whence);
};
typedef std::map<DrvOutput, Realisation> DrvOutputs;