1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2024-10-18 14:32:45 -04:00
nix/src/libcmd/common-eval-args.hh
Eelco Dolstra cbfd211b39 Fix build
2024-03-04 12:49:32 +01:00

44 lines
915 B
C++

#pragma once
///@file
#include "args.hh"
#include "canon-path.hh"
#include "common-args.hh"
#include "search-path.hh"
#include <filesystem>
namespace nix {
class Store;
class EvalState;
class Bindings;
struct SourcePath;
struct MixEvalArgs : virtual Args, virtual MixRepair
{
static constexpr auto category = "Common evaluation options";
MixEvalArgs();
Bindings * getAutoArgs(EvalState & state);
SearchPath searchPath;
std::optional<std::string> evalStoreUrl;
private:
struct AutoArgExpr { std::string expr; };
struct AutoArgString { std::string s; };
struct AutoArgFile { std::filesystem::path path; };
struct AutoArgStdin { };
using AutoArg = std::variant<AutoArgExpr, AutoArgString, AutoArgFile, AutoArgStdin>;
std::map<std::string, AutoArg> autoArgs;
};
SourcePath lookupFileArg(EvalState & state, std::string_view s, const Path * baseDir = nullptr);
}