mirror of
https://github.com/NixOS/nix
synced 2025-06-28 09:31:16 +02:00
For example, instead of doing #include "nix/store-config.hh" #include "nix/derived-path.hh" Now do #include "nix/store/config.hh" #include "nix/store/derived-path.hh" This was originally planned in the issue, and also recent requested by Eelco. Most of the change is purely mechanical. There is just one small additional issue. See how, in the example above, we took this opportunity to also turn `<comp>-config.hh` into `<comp>/config.hh`. Well, there was already a `nix/util/config.{cc,hh}`. Even though there is not a public configuration header for libutil (which also would be called `nix/util/config.{cc,hh}`) that's still confusing, To avoid any such confusion, we renamed that to `nix/util/configuration.{cc,hh}`. Finally, note that the libflake headers already did this, so we didn't need to do anything to them. We wouldn't want to mistakenly get `nix/flake/flake/flake.hh`! Progress on #7876
64 lines
1.1 KiB
C++
64 lines
1.1 KiB
C++
#ifndef NIX_API_EXPR_INTERNAL_H
|
|
#define NIX_API_EXPR_INTERNAL_H
|
|
|
|
#include "nix/fetchers/fetch-settings.hh"
|
|
#include "nix/expr/eval.hh"
|
|
#include "nix/expr/eval-settings.hh"
|
|
#include "nix/expr/attr-set.hh"
|
|
#include "nix_api_value.h"
|
|
#include "nix/expr/search-path.hh"
|
|
|
|
struct nix_eval_state_builder
|
|
{
|
|
nix::ref<nix::Store> store;
|
|
nix::EvalSettings settings;
|
|
nix::fetchers::Settings fetchSettings;
|
|
nix::LookupPath lookupPath;
|
|
// TODO: make an EvalSettings setting own this instead?
|
|
bool readOnlyMode;
|
|
};
|
|
|
|
struct EvalState
|
|
{
|
|
nix::fetchers::Settings fetchSettings;
|
|
nix::EvalSettings settings;
|
|
nix::EvalState state;
|
|
};
|
|
|
|
struct BindingsBuilder
|
|
{
|
|
nix::BindingsBuilder builder;
|
|
};
|
|
|
|
struct ListBuilder
|
|
{
|
|
nix::ListBuilder builder;
|
|
};
|
|
|
|
struct nix_value
|
|
{
|
|
nix::Value value;
|
|
};
|
|
|
|
struct nix_string_return
|
|
{
|
|
std::string str;
|
|
};
|
|
|
|
struct nix_printer
|
|
{
|
|
std::ostream & s;
|
|
};
|
|
|
|
struct nix_string_context
|
|
{
|
|
nix::NixStringContext & ctx;
|
|
};
|
|
|
|
struct nix_realised_string
|
|
{
|
|
std::string str;
|
|
std::vector<StorePath> storePaths;
|
|
};
|
|
|
|
#endif // NIX_API_EXPR_INTERNAL_H
|