Nix 2.26.3
Nix, the purely functional package manager; unstable internal interfaces
 
Loading...
Searching...
No Matches
nix::UnkeyedValidPathInfo Struct Reference

#include <path-info.hh>

Inheritance diagram for nix::UnkeyedValidPathInfo:
nix::ValidPathInfo nix::NarInfo

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< StorePathderiver
 
Hash narHash
 
StorePathSet references
 
time_t registrationTime = 0
 
uint64_t narSize = 0
 
uint64_t id = 0
 
bool ultimate = false
 
StringSet sigs
 
std::optional< ContentAddressca
 

Detailed Description

Information about a store object.

See store/store-object and protocols/json/store-object-info in the Nix manual

Member Function Documentation

◆ operator<=>()

std::weak_ordering nix::UnkeyedValidPathInfo::operator<=> ( const UnkeyedValidPathInfo & ) const
noexcept
Todo
return std::strong_ordering once id is removed

◆ toJSON()

nlohmann::json nix::UnkeyedValidPathInfo::toJSON ( const Store & store,
bool includeImpureInfo,
HashFormat hashFormat ) const
virtual
Parameters
includeImpureInfoIf true, variable elements such as the registration time are included.

Reimplemented in nix::NarInfo.

Member Data Documentation

◆ ca

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.

◆ deriver

std::optional<StorePath> nix::UnkeyedValidPathInfo::deriver

Path to derivation that produced this store object, if known.

◆ id

uint64_t nix::UnkeyedValidPathInfo::id = 0

internal use only: SQL primary key for on-disk store objects with LocalStore.

Todo
Remove, layer violation

◆ narHash

Hash nix::UnkeyedValidPathInfo::narHash
Todo
document this

◆ narSize

uint64_t nix::UnkeyedValidPathInfo::narSize = 0

0 = unknown

◆ references

StorePathSet nix::UnkeyedValidPathInfo::references

Other store objects this store object referes to.

◆ registrationTime

time_t nix::UnkeyedValidPathInfo::registrationTime = 0

When this store object was registered in the store that contains it, if known.

◆ ultimate

bool nix::UnkeyedValidPathInfo::ultimate = false

Whether the path is ultimately trusted, that is, it's a derivation output that was built locally.


The documentation for this struct was generated from the following files: