9#include <nlohmann/json_fwd.hpp>
11#include "signature/signer.hh"
39 std::string to_string()
const;
41 std::string strHash()
const
44 static DrvOutput parse(
const std::string &);
63 nlohmann::json toJSON()
const;
64 static Realisation fromJSON(
const nlohmann::json& json,
const std::string& whence);
66 std::string fingerprint()
const;
67 void sign(
const Signer &);
68 bool checkSignature(
const PublicKeys & publicKeys,
const std::string & sig)
const;
69 size_t checkSignatures(
const PublicKeys & publicKeys)
const;
71 static std::set<Realisation> closure(
Store &,
const std::set<Realisation> &);
72 static void closure(
Store &,
const std::set<Realisation> &, std::set<Realisation> &
res);
74 bool isCompatibleWith(
const Realisation & other)
const;
76 StorePath getPath()
const {
return outPath; }
109 StorePath getPath()
const {
return path; }
123 using Raw = std::variant<Realisation, OpaquePath>;
126 using Set = std::set<RealisedPath>;
137 static void closure(
Store&
store,
const Set& startPaths, Set& ret);
140 GENERATE_CMP(RealisedPath, me->raw);
143class MissingRealisation :
public Error
147 : MissingRealisation(outputId.
outputName, outputId.strHash())
149 MissingRealisation(std::string_view drv,
OutputName outputName)
150 : Error(
"cannot operate on output '%s' of the "
151 "unbuilt derivation '%s'",
Definition store-api.hh:169
ChunkedVector< std::string, 8192 > store
Definition lexer.l:1011
Strings res
Definition lexer.l:2566
std::string OutputName
Definition outputs-spec.hh:18
@ Base16
Lowercase hexadecimal encoding.
Definition hash.hh:36
std::map< DrvOutput, Realisation > DrvOutputs
Definition realisation.hh:96
std::map< OutputName, Realisation > SingleDrvOutputs
Definition realisation.hh:87
Definition realisation.hh:24
OutputName outputName
Definition realisation.hh:37
Hash drvHash
Definition realisation.hh:32
Definition realisation.hh:106
Definition outputs-spec.hh:26
Definition realisation.hh:49
std::map< DrvOutput, StorePath > dependentRealisations
Definition realisation.hh:61
StorePath path() const
Definition realisation.cc:153