Nix 2.93.3
Lix: A modern, delicious implementation of the Nix package manager; unstable internal interfaces
Loading...
Searching...
No Matches
attrs.hh File Reference
#include "lix/libutil/json-fwd.hh"
#include "lix/libutil/types.hh"
#include "lix/libutil/hash.hh"
#include <variant>
#include <optional>

Go to the source code of this file.

Typedefs

typedef std::variant< std::string, uint64_t, Explicit< bool > > nix::fetchers::Attr
typedef std::map< std::string, Attr > nix::fetchers::Attrs

Functions

Attrs nix::fetchers::jsonToAttrs (const JSON &json)
JSON nix::fetchers::attrsToJSON (const Attrs &attrs)
std::optional< std::string > nix::fetchers::maybeGetStrAttr (const Attrs &attrs, const std::string &name)
std::string nix::fetchers::getStrAttr (const Attrs &attrs, const std::string &name)
std::optional< uint64_t > nix::fetchers::maybeGetIntAttr (const Attrs &attrs, const std::string &name)
uint64_t nix::fetchers::getIntAttr (const Attrs &attrs, const std::string &name)
std::optional< bool > nix::fetchers::maybeGetBoolAttr (const Attrs &attrs, const std::string &name)
bool nix::fetchers::getBoolAttr (const Attrs &attrs, const std::string &name)
std::map< std::string, std::string > nix::fetchers::attrsToQuery (const Attrs &attrs)