#include <path-info.hh>
Public Member Functions | |
UnkeyedValidPathInfo (const UnkeyedValidPathInfo &other)=default | |
UnkeyedValidPathInfo (Hash narHash) | |
bool | operator== (const UnkeyedValidPathInfo &) const noexcept |
std::weak_ordering | operator<=> (const UnkeyedValidPathInfo &) const noexcept |
virtual nlohmann::json | toJSON (const Store &store, bool includeImpureInfo, HashFormat hashFormat) const |
Static Public Member Functions | |
static UnkeyedValidPathInfo | fromJSON (const Store &store, const nlohmann::json &json) |
Public Attributes | |
std::optional< StorePath > | deriver |
Hash | narHash |
StorePathSet | references |
time_t | registrationTime = 0 |
uint64_t | narSize = 0 |
uint64_t | id = 0 |
bool | ultimate = false |
StringSet | sigs |
std::optional< ContentAddress > | ca |
Information about a store object.
See store/store-object
and protocols/json/store-object-info
in the Nix manual
|
noexcept |
std::strong_ordering
once id
is removed
|
virtual |
includeImpureInfo | If true, variable elements such as the registration time are included. |
Reimplemented in nix::NarInfo.
std::optional<ContentAddress> nix::UnkeyedValidPathInfo::ca |
If non-empty, an assertion that the path is content-addressed, i.e., that the store path is computed from a cryptographic hash of the contents of the path, plus some other bits of data like the "name" part of the path. Such a path doesn't need signatures, since we don't have to trust anybody's claim that the path is the output of a particular derivation. (In the extensional store model, we have to trust that the contents of an output path of a derivation were actually produced by that derivation. In the intensional model, we have to trust that a particular output path was produced by a derivation; the path then implies the contents.)
Ideally, the content-addressability assertion would just be a Boolean, and the store path would be computed from the name component, ‘narHash’ and ‘references’. However, we support many types of content addresses.
std::optional<StorePath> nix::UnkeyedValidPathInfo::deriver |
Path to derivation that produced this store object, if known.
uint64_t nix::UnkeyedValidPathInfo::id = 0 |
internal use only: SQL primary key for on-disk store objects with LocalStore
.
uint64_t nix::UnkeyedValidPathInfo::narSize = 0 |
0 = unknown
StorePathSet nix::UnkeyedValidPathInfo::references |
Other store objects this store object referes to.
time_t nix::UnkeyedValidPathInfo::registrationTime = 0 |
When this store object was registered in the store that contains it, if known.
bool nix::UnkeyedValidPathInfo::ultimate = false |
Whether the path is ultimately trusted, that is, it's a derivation output that was built locally.