Flox Package Database 1
CRUD Operations on Nix Package Metadata
Loading...
Searching...
No Matches
Namespaces | Functions
primops.cc File Reference

Extensions to nix primitive operations. More...

#include <nix/json-to-value.hh>
#include <nix/primops.hh>
#include <nix/value-to-json.hh>
#include <nlohmann/json.hpp>
#include "flox/core/expr.hh"
#include "flox/registry.hh"
#include "flox/resolver/descriptor.hh"
#include "flox/resolver/environment.hh"
#include "flox/resolver/manifest-raw.hh"
#include "flox/resolver/manifest.hh"
#include "flox/resolver/primops.hh"

Namespaces

namespace  flox
 Interfaces for use by flox.
 

Functions

void flox::resolver::prim_resolve (nix::EvalState &state, const nix::PosIdx pos, nix::Value **args, nix::Value &value)
 Resolve a descriptor to an installable.
 
static nix::RegisterPrimOp flox::resolver::primop_resolve ({ .name="__resolve",.args={ "options", "input", "descriptor" },.arity=0,.doc=R"( Resolve a descriptor to an installable. Takes the following arguments: - `options`: An attribute set of `flox::Options`. - `input`: Either an attribute set or string flake-ref. - `descriptor`: Either a string or attribute set representing a descriptor. The fields `name`, `version`, `path`, `absPath`, and `systems` are respected. )",.fun=prim_resolve,.experimentalFeature=nix::Xp::Flakes })
 

Detailed Description

Extensions to nix primitive operations.

Function Documentation

◆ prim_resolve()

void flox::resolver::prim_resolve ( nix::EvalState &  state,
const nix::PosIdx  pos,
nix::Value **  args,
nix::Value &  value 
)

Resolve a descriptor to an installable.

Takes the following arguments:

  • options: An attribute set of flox::Options.
  • flake-ref: Either an attribute set or string.
  • query: Either a string or attribute set representing a descriptor.
Parameters
stateThe nix evaluator's state.
posThe position ( file name and line/column numbers ) of the call. This is generally used for error reporting.
argsThe arguments to the primitive.
valueAn allocated nix::Value to store the result in.