Flox Package Database 1
CRUD Operations on Nix Package Metadata
Loading...
Searching...
No Matches
Namespaces | Typedefs | Enumerations | Functions
types.hh File Reference

Miscellaneous typedefs and aliases. More...

#include <string>
#include <vector>
#include <nix/eval-cache.hh>
#include <nix/flake/flake.hh>
#include <nix/ref.hh>
#include <nlohmann/json.hpp>

Go to the source code of this file.

Namespaces

namespace  flox
 Interfaces for use by flox.
 

Typedefs

using flox::AttrPath = std::vector< std::string >
 A list of key names addressing a location in a nested JSON-like object.
 
using flox::AttrPathGlob = std::vector< std::optional< std::string > >
 An attribute path which may contain null members to represent globs.
 
using flox::MaybeCursor = std::shared_ptr< nix::eval_cache::AttrCursor >
 A std::shared_ptr<nix::eval_cache::AttrCursor> which may be nullptr.
 
using flox::Cursor = nix::ref< nix::eval_cache::AttrCursor >
 A non-nullptr std::shared_ptr<nix::eval_cache::AttrCursor>.
 
using flox::System = std::string
 A system pair indicating architecture and platform.
 

Enumerations

enum  flox::subtree_type { ST_NONE = 0 , ST_LEGACY = 1 , ST_PACKAGES = 2 }
 A top level key in a nix flake.
 

Functions

 flox::NLOHMANN_JSON_SERIALIZE_ENUM (subtree_type, { { ST_NONE, nullptr }, { ST_LEGACY, "legacyPackages" }, { ST_PACKAGES, "packages" } }) struct Subtree
 A strongly typed wrapper over an attribute path subtree name, which is the first element of an attribute path.
 
void flox::from_json (const nlohmann::json &jfrom, Subtree &subtree)
 Convert a JSON string to a flox::Subtree.
 
void flox::to_json (nlohmann::json &jto, const Subtree &subtree)
 Convert a flox::Subtree to a JSON string.
 

Detailed Description

Miscellaneous typedefs and aliases.