Nix 2.36.0
Nix, the purely functional package manager; unstable internal interfaces
Loading...
Searching...
No Matches
store-api.hh File Reference
#include "nix/store/outputs-spec.hh"
#include "nix/store/path.hh"
#include "nix/store/derived-path.hh"
#include "nix/util/hash.hh"
#include "nix/store/content-address.hh"
#include "nix/util/serialise.hh"
#include "nix/util/lru-cache.hh"
#include "nix/util/sync.hh"
#include "nix/util/configuration.hh"
#include "nix/store/path-info.hh"
#include "nix/util/repair-flag.hh"
#include "nix/store/store-dir-config.hh"
#include "nix/store/store-reference.hh"
#include "nix/store/substituter.hh"
#include "nix/util/source-path.hh"
#include <nlohmann/json_fwd.hpp>
#include <atomic>
#include <map>
#include <memory>
#include <string>
#include <chrono>

Go to the source code of this file.

Classes

struct  nix::MissingPaths
struct  nix::StoreConfigBase
class  nix::StoreConfigBase::StoreDirSetting
struct  nix::StoreConfig
class  nix::Store
struct  nix::Store::PathInfoCacheValue

Namespaces

namespace  nix::derivation

Typedefs

typedef std::map< std::string, StorePath > nix::OutputPathMap
typedef std::map< StorePath, std::optional< ContentAddress > > nix::StorePathCAMap

Enumerations

enum  CheckSigsFlag : bool { NoCheckSigs = false , CheckSigs = true }
enum  BuildMode : uint8_t { bmNormal , bmRepair , bmCheck }
enum  TrustedFlag : bool { NotTrusted = false , Trusted = true }

Functions

 nix::MakeError (InvalidPath, Error)
 nix::MakeError (Unsupported, Error)
 nix::MakeError (InvalidStoreReference, Error)
void nix::copyStorePath (Store &srcStore, Store &dstStore, const StorePath &storePath, RepairFlag repair=NoRepair, CheckSigsFlag checkSigs=CheckSigs)
std::map< StorePath, StorePath > nix::copyPaths (Store &srcStore, Store &dstStore, const std::set< RealisedPath > &, RepairFlag repair=NoRepair, CheckSigsFlag checkSigs=CheckSigs, SubstituteFlag substitute=NoSubstitute)
std::map< StorePath, StorePath > nix::copyPaths (Store &srcStore, Store &dstStore, const StorePathSet &paths, RepairFlag repair=NoRepair, CheckSigsFlag checkSigs=CheckSigs, SubstituteFlag substitute=NoSubstitute)
void nix::copyClosure (Store &srcStore, Store &dstStore, const std::set< RealisedPath > &paths, RepairFlag repair=NoRepair, CheckSigsFlag checkSigs=CheckSigs, SubstituteFlag substitute=NoSubstitute, bool includeOutputs=false)
void nix::copyClosure (Store &srcStore, Store &dstStore, const StorePathSet &paths, RepairFlag repair=NoRepair, CheckSigsFlag checkSigs=CheckSigs, SubstituteFlag substitute=NoSubstitute, bool includeOutputs=false)
void nix::removeTempRoots ()
StorePath nix::resolveDerivedPath (Store &, const SingleDerivedPath &, Store *evalStore=nullptr)
OutputPathMap nix::resolveDerivedPath (Store &, const DerivedPath::Built &, Store *evalStore=nullptr)
std::optional< ValidPathInfo > nix::decodeValidPathInfo (const Store &store, std::istream &str, std::optional< HashResult > hashGiven=std::nullopt)
const ContentAddress * nix::getDerivationCA (const Derivation &drv)

Function Documentation

◆ copyClosure()

void nix::copyClosure ( Store & srcStore,
Store & dstStore,
const std::set< RealisedPath > & paths,
RepairFlag repair = NoRepair,
CheckSigsFlag checkSigs = CheckSigs,
SubstituteFlag substitute = NoSubstitute,
bool includeOutputs = false )

Copy the closure of paths from srcStore to dstStore.

◆ copyPaths()

std::map< StorePath, StorePath > nix::copyPaths ( Store & srcStore,
Store & dstStore,
const std::set< RealisedPath > & ,
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.

Returns
a map of what each path was copied to the dstStore as.

◆ copyStorePath()

void nix::copyStorePath ( Store & srcStore,
Store & dstStore,
const StorePath & storePath,
RepairFlag repair = NoRepair,
CheckSigsFlag checkSigs = CheckSigs )

Copy a path from one store to another.

◆ removeTempRoots()

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.

◆ resolveDerivedPath()

StorePath nix::resolveDerivedPath ( Store & store,
const SingleDerivedPath & req,
Store * evalStore = nullptr )

Resolve the derived path completely, failing if any derivation output is unknown.