![]() |
Nix 2.36.0
Nix, the purely functional package manager; unstable internal interfaces
|
#include <path-info.hh>
Public Member Functions | |
| UnkeyedValidPathInfo (const UnkeyedValidPathInfo &other)=default | |
| UnkeyedValidPathInfo (const StoreDirConfig &store, Hash narHash) | |
| UnkeyedValidPathInfo (std::string storeDir, Hash narHash) | |
| bool | operator== (const UnkeyedValidPathInfo &) const noexcept |
| std::weak_ordering | operator<=> (const UnkeyedValidPathInfo &) const noexcept |
| virtual nlohmann::json | toJSON (const StoreDirConfig *store, bool includeImpureInfo, PathInfoJsonFormat format) const |
Static Public Member Functions | |
| static UnkeyedValidPathInfo | fromJSON (const StoreDirConfig *store, const nlohmann::json &json) |
Public Attributes | |
| std::string | storeDir |
| std::optional< StorePath > | deriver |
| Hash | narHash |
| StorePathSet | references |
| time_t | registrationTime = 0 |
| uint64_t | narSize = 0 |
| bool | ultimate = false |
| std::set< Signature > | 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 |
|
virtual |
| store | If non-null, store paths are rendered as full paths. If null, store paths are rendered as base names. |
| includeImpureInfo | If true, variable elements such as the registration time are included. |
| format | JSON format version. Version 1 uses string hashes and string content addresses. Version 2 uses structured hashes and structured content addresses. |
Reimplemented in nix::UnkeyedNarInfo.
| 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::narSize = 0 |
0 = unknown
| StorePathSet nix::UnkeyedValidPathInfo::references |
Other store objects this store object refers to.
| time_t nix::UnkeyedValidPathInfo::registrationTime = 0 |
When this store object was registered in the store that contains it, if known.
| std::string nix::UnkeyedValidPathInfo::storeDir |
The store directory this store object belongs to.
This supports relocatable store objects where different objects may have different store directories.
| bool nix::UnkeyedValidPathInfo::ultimate = false |
Whether the path is ultimately trusted, that is, it's a derivation output that was built locally.