Nix 2.36.0
Nix, the purely functional package manager; unstable internal interfaces
Loading...
Searching...
No Matches
outputs-query.hh File Reference
#include "nix/store/store-api.hh"
#include <functional>

Go to the source code of this file.

Typedefs

using nix::QueryRealisationFun = std::function<std::shared_ptr<const UnkeyedRealisation>(const DrvOutput &)>

Functions

void nix::queryPartialDerivationOutputMapCA (Store &store, const StorePath &drvPath, const Derivation &drv, std::map< std::string, std::optional< StorePath > > &outputs, QueryRealisationFun queryRealisation={})
std::optional< StorePath > nix::deepQueryPartialDerivationOutput (Store &store, const StorePath &drvPath, const std::string &outputName, Store *evalStore=nullptr, QueryRealisationFun queryRealisation={})
std::map< std::string, std::optional< StorePath > > nix::deepQueryPartialDerivationOutputMap (Store &store, const StorePath &drvPath, Store *evalStore=nullptr, QueryRealisationFun queryRealisation={})
OutputPathMap nix::deepQueryDerivationOutputMap (Store &store, const StorePath &drvPath, Store *evalStore=nullptr, QueryRealisationFun queryRealisation={})

Typedef Documentation

◆ QueryRealisationFun

using nix::QueryRealisationFun = std::function<std::shared_ptr<const UnkeyedRealisation>(const DrvOutput &)>

Callback type for querying realisations. The callback should return the realisation for the given DrvOutput, or nullptr if not found.

Function Documentation

◆ deepQueryDerivationOutputMap()

OutputPathMap nix::deepQueryDerivationOutputMap ( Store & store,
const StorePath & drvPath,
Store * evalStore = nullptr,
QueryRealisationFun queryRealisation = {} )

Like deepQueryPartialDerivationOutputMap, but throws if any output path is not known.

Parameters
queryRealisationOptional callback for querying realisations. If not provided, uses store.queryRealisation().

◆ deepQueryPartialDerivationOutput()

std::optional< StorePath > nix::deepQueryPartialDerivationOutput ( Store & store,
const StorePath & drvPath,
const std::string & outputName,
Store * evalStore = nullptr,
QueryRealisationFun queryRealisation = {} )

Like Store::queryStaticPartialDerivationOutput, but resolves the derivation first if needed.

Parameters
queryRealisationOptional callback for querying realisations. If not provided, uses store.queryRealisation().

◆ deepQueryPartialDerivationOutputMap()

std::map< std::string, std::optional< StorePath > > nix::deepQueryPartialDerivationOutputMap ( Store & store,
const StorePath & drvPath,
Store * evalStore = nullptr,
QueryRealisationFun queryRealisation = {} )

Like Store::queryStaticPartialDerivationOutputMap, but resolves the derivation first if needed for CA derivation output lookup.

Parameters
queryRealisationOptional callback for querying realisations. If not provided, uses store.queryRealisation().

◆ queryPartialDerivationOutputMapCA()

void nix::queryPartialDerivationOutputMapCA ( Store & store,
const StorePath & drvPath,
const Derivation & drv,
std::map< std::string, std::optional< StorePath > > & outputs,
QueryRealisationFun queryRealisation = {} )

Just used in the implementation of Store::queryPartialDerivationOutputMap.