Nix 2.36.0
Nix, the purely functional package manager; unstable internal interfaces
Loading...
Searching...
No Matches
nix::BuildingStore Struct Referenceabstract

#include <derivation-builder.hh>

Inheritance diagram for nix::BuildingStore:
nix::StoreDirConfig

Public Member Functions

 BuildingStore (const std::string &storeDir)
virtual std::filesystem::path getRealStoreDir () const =0
virtual std::filesystem::path getBuildDir () const =0
virtual const LocalSettings & getLocalSettings () const =0
virtual ref< Store > makeRecursiveNixStore (RestrictionContext &ctx)=0
std::filesystem::path toRealPath (const StorePath &storePath) const
Public Member Functions inherited from nix::StoreDirConfig
StorePath parseStorePath (std::string_view path) const
StorePath parseStorePathCanonical (std::string_view path) const
std::optional< StorePath > maybeParseStorePath (std::string_view path) const
std::string printStorePath (const StorePath &path) const
StringSet printStorePathSet (const StorePathSet &path) const
std::size_t maxCanonicalStorePathLen () const noexcept
bool isInStore (std::string_view path) const
bool isStorePath (std::string_view path) const
std::pair< StorePath, CanonPath > toStorePath (std::string_view path) const
StorePath makeStorePath (std::string_view type, std::string_view hash, std::string_view name) const
StorePath makeStorePath (std::string_view type, const Hash &hash, std::string_view name) const
StorePath makeOutputPath (std::string_view id, const Hash &hash, std::string_view name) const
StorePath makeFixedOutputPath (std::string_view name, const FixedOutputInfo &info) const
StorePath makeFixedOutputPathFromCA (std::string_view name, const ContentAddressWithReferences &ca) const
std::pair< StorePath, Hash > computeStorePath (std::string_view name, const SourcePath &path, ContentAddressMethod method=ContentAddressMethod::Raw::NixArchive, HashAlgorithm hashAlgo=HashAlgorithm::SHA256, const StorePathSet &references={}, PathFilter &filter=defaultPathFilter) const

Additional Inherited Members

Public Attributes inherited from nix::StoreDirConfig
const std::string & storeDir

Detailed Description

This type exists to cut down Store to what DerivationBuilder actually needs. This serves two purposes:

  • Modularity: Now we better understand the requirements different components impose on one another. Conversely, Store is more or less the union of many interfaces' requirements, so it obscures the division of labor to require it everywhere.
  • FFI: we cannot make a full LocalStore with everything (including building, which uses this!) from FFI, but we do have a chance of making something that just has the methods we actually need from LocalStore.

Member Function Documentation

◆ makeRecursiveNixStore()

virtual ref< Store > nix::BuildingStore::makeRecursiveNixStore ( RestrictionContext & ctx)
pure virtual

Make the store that recursive-Nix daemon connections talk to.


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