|
Nix 2.93.3
Lix: A modern, delicious implementation of the Nix package manager; unstable internal interfaces
|
#include "lix/libutil/archive.hh"#include "lix/libutil/async-io.hh"#include "lix/libutil/async.hh"#include "lix/libutil/json-fwd.hh"#include "lix/libutil/logging.hh"#include "lix/libstore/nar-info.hh"#include "lix/libstore/realisation.hh"#include "lix/libstore/path.hh"#include "lix/libstore/derived-path.hh"#include "lix/libutil/hash.hh"#include "lix/libstore/content-address.hh"#include "lix/libutil/result.hh"#include "lix/libutil/serialise.hh"#include "lix/libutil/lru-cache.hh"#include "lix/libutil/sync.hh"#include "lix/libstore/globals.hh"#include "lix/libutil/config.hh"#include "lix/libstore/path-info.hh"#include "lix/libutil/repair-flag.hh"#include "lix/libutil/source-path.hh"#include <kj/async.h>#include <atomic>#include <limits>#include <map>#include <type_traits>#include <unordered_map>#include <unordered_set>#include <memory>#include <string>#include <chrono>#include <variant>Go to the source code of this file.
Classes | |
| struct | nix::json::is_integral_enum< TrustedFlag > |
| struct | nix::StoreConfig |
| class | nix::Store |
| struct | nix::Store::PathInfoCacheValue |
| struct | nix::Store::State |
| struct | nix::Store::AssociatedCredentials |
| struct | nix::Store::Stats< Wrapper > |
| struct | nix::StoreFactory |
| struct | nix::StoreImplementations |
Typedefs | |
| typedef std::map< std::string, StorePath > | nix::OutputPathMap |
| typedef std::map< StorePath, std::optional< ContentAddress > > | nix::StorePathCAMap |
Functions | |
| nix::MakeError (SubstError, Error) | |
| nix::MakeError (BuildError, Error) | |
| nix::MakeError (InvalidPath, Error) | |
| nix::MakeError (Unsupported, Error) | |
| nix::MakeError (SubstituteGone, Error) | |
| nix::MakeError (SubstituterDisabled, Error) | |
| nix::MakeError (BadStorePath, Error) | |
| nix::MakeError (InvalidStoreURI, Error) | |
| BuildMode | nix::buildModeFromInteger (int raw) |
| kj::Promise< Result< void > > | nix::copyStorePath (Store &srcStore, Store &dstStore, const StorePath &storePath, RepairFlag repair, CheckSigsFlag checkSigs) |
| kj::Promise< Result< std::map< StorePath, StorePath > > > | nix::copyPaths (Store &srcStore, Store &dstStore, const RealisedPath::Set &paths, RepairFlag repair, CheckSigsFlag checkSigs, SubstituteFlag substitute) |
| kj::Promise< Result< std::map< StorePath, StorePath > > > | nix::copyPaths (Store &srcStore, Store &dstStore, const StorePathSet &storePaths, RepairFlag repair, CheckSigsFlag checkSigs, SubstituteFlag substitute) |
| kj::Promise< Result< void > > | nix::copyClosure (Store &srcStore, Store &dstStore, const RealisedPath::Set &paths, RepairFlag repair, CheckSigsFlag checkSigs, SubstituteFlag substitute) |
| kj::Promise< Result< void > > | nix::copyClosure (Store &srcStore, Store &dstStore, const StorePathSet &storePaths, RepairFlag repair, CheckSigsFlag checkSigs, SubstituteFlag substitute) |
| void | nix::removeTempRoots () |
| kj ::Promise< Result< StorePath > > | nix::resolveDerivedPath (Store &store, const SingleDerivedPath &req, Store *evalStore_) |
| kj::Promise< Result< OutputPathMap > > | nix::resolveDerivedPath (Store &store, const DerivedPath::Built &bfd, Store *evalStore_) |
| kj::Promise< Result< ref< Store > > > | nix::openStore (const std::string &uri_, const StoreConfig::Params &extraParams) |
| kj::Promise< Result< std::list< ref< Store > > > > | nix::getDefaultSubstituters () |
| std::string | nix::showPaths (const PathSet &paths) |
| std::optional< ValidPathInfo > | nix::decodeValidPathInfo (const Store &store, std::istream &str, std::optional< HashResult > hashGiven) |
| std::pair< std::string, StoreConfig::Params > | nix::splitUriAndParams (const std::string &uri_) |
| const ContentAddress * | nix::getDerivationCA (const BasicDerivation &drv) |
| kj::Promise< Result< std::map< DrvOutput, StorePath > > > | nix::drvOutputReferences (Store &store, const Derivation &drv, const StorePath &outputPath, Store *evalStore_) |
Variables | |
| const uint32_t | nix::exportMagic = 0x4558494e |
| BuildMode nix::buildModeFromInteger | ( | int | ) |
Checks that a build mode is a valid one, then returns it
| kj::Promise< Result< void > > nix::copyClosure | ( | Store & | srcStore, |
| Store & | dstStore, | ||
| const RealisedPath::Set & | paths, | ||
| RepairFlag | repair = NoRepair, | ||
| CheckSigsFlag | checkSigs = CheckSigs, | ||
| SubstituteFlag | substitute = NoSubstitute ) |
Copy the closure of paths from srcStore to dstStore.
| kj::Promise< Result< std::map< StorePath, StorePath > > > nix::copyPaths | ( | Store & | srcStore, |
| Store & | dstStore, | ||
| const RealisedPath::Set & | , | ||
| RepairFlag | repair = NoRepair, | ||
| CheckSigsFlag | checkSigs = CheckSigs, | ||
| SubstituteFlag | substitute = NoSubstitute ) |
Copy store paths from one store to another. The paths may be copied in parallel. They are copied in a topologically sorted order (i.e. if A is a reference of B, then A is copied before B), but the set of store paths is not automatically closed; use copyClosure() for that.
| kj::Promise< Result< void > > nix::copyStorePath | ( | Store & | srcStore, |
| Store & | dstStore, | ||
| const StorePath & | storePath, | ||
| RepairFlag | repair = NoRepair, | ||
| CheckSigsFlag | checkSigs = CheckSigs ) |
Copy a path from one store to another.
| kj::Promise< Result< std::list< ref< Store > > > > nix::getDefaultSubstituters | ( | ) |
| nix::MakeError | ( | BadStorePath | , |
| Error | ) |
denotes that a path could not possibly be a store path. e.g. outside of the nix store, illegal characters in the name, etc.
| nix::MakeError | ( | BuildError | , |
| Error | ) |
denotes a permanent build failure
| nix::MakeError | ( | InvalidPath | , |
| Error | ) |
denotes that a path in the store did not exist (but it could, had it been put there, i.e. it is still legal).
| nix::MakeError | ( | SubstError | , |
| Error | ) |
About the class hierarchy of the store implementations:
Each store type Foo consists of two classes:
A class FooConfig : virtual StoreConfig that contains the configuration for the store
It should only contain members of type const Setting<T> (or subclasses of it) and inherit the constructors of StoreConfig (using StoreConfig::StoreConfig).
A class Foo : virtual Store that contains the implementation of the store.
This class is expected to have a constructor Foo(FooConfig config) that calls StoreConfig(config) (otherwise you're gonna encounter an assertion failure when trying to instantiate it).
You can then register the new store by defining a registration function (using StoreImplementations::add) and calling it in registerStoreImplementations in globals.cc.
| kj::Promise< Result< ref< Store > > > nix::openStore | ( | const std::string & | uri = settings.storeUri.get(), |
| const StoreConfig::Params & | extraParams = {} ) |
| uri | Supported values are: |
You can pass parameters to the store implementation by appending ‘?key=value&key=value&...’ to the URI.
| void nix::removeTempRoots | ( | ) |
Remove the temporary roots file for this process. Any temporary root becomes garbage after this point unless it has been registered as a (permanent) root.
| kj::Promise< Result< StorePath > > nix::resolveDerivedPath | ( | Store & | , |
| const SingleDerivedPath & | , | ||
| Store * | evalStore = nullptr ) |
Resolve the derived path completely, failing if any derivation output is unknown.
| std::string nix::showPaths | ( | const PathSet & | paths | ) |
Display a set of paths in human-readable form (i.e., between quotes and separated by commas).
| std::pair< std::string, StoreConfig::Params > nix::splitUriAndParams | ( | const std::string & | uri | ) |
Split URI into protocol+hierarchy part and its parameter set.
| const uint32_t nix::exportMagic = 0x4558494e |
Magic header of exportPath() output (obsolete).