Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions src/libexpr/include/nix/expr/eval.hh
Original file line number Diff line number Diff line change
Expand Up @@ -243,10 +243,9 @@ struct StaticEvalSymbols
{
Symbol with, outPath, drvPath, type, meta, name, value, system, overrides, outputs, outputName, ignoreNulls, file,
line, column, functor, toString, right, wrong, structuredAttrs, json, allowedReferences, allowedRequisites,
disallowedReferences, disallowedRequisites, maxSize, maxClosureSize, builder, args, gitDir, resolver, rev,
checkoutPath, targets, contentAddressed, impure, outputHash, outputHashAlgo, outputHashMode,
recurseForDerivations, description, self, epsilon, startSet, operator_, key, path, prefix, outputSpecified,
__meta;
disallowedReferences, disallowedRequisites, maxSize, maxClosureSize, builder, args, contentAddressed, impure,
outputHash, outputHashAlgo, outputHashMode, recurseForDerivations, description, self, epsilon, startSet,
operator_, key, path, prefix, outputSpecified, __meta;

Expr::AstSymbols exprSymbols;

Expand Down Expand Up @@ -284,11 +283,6 @@ struct StaticEvalSymbols
.maxClosureSize = alloc.create("maxClosureSize"),
.builder = alloc.create("builder"),
.args = alloc.create("args"),
.gitDir = alloc.create("gitDir"),
.resolver = alloc.create("resolver"),
.rev = alloc.create("rev"),
.checkoutPath = alloc.create("checkoutPath"),
.targets = alloc.create("targets"),
.contentAddressed = alloc.create("__contentAddressed"),
.impure = alloc.create("__impure"),
.outputHash = alloc.create("outputHash"),
Expand Down
10 changes: 5 additions & 5 deletions src/libexpr/primops/tecnix.cc
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ static std::string
resolveRev(EvalState & state, const PosIdx pos, const Bindings & attrs, const std::string & checkoutPath)
{
// Check for explicit rev attr
auto revAttr = attrs.get(state.s.rev);
auto revAttr = attrs.get(state.symbols.create("rev"));
if (revAttr) {
auto sha = state.forceStringNoCtx(*revAttr->value, pos, "while evaluating the 'rev' argument");
if (!sha.empty())
Expand Down Expand Up @@ -181,19 +181,19 @@ static const Bindings & forceTecnixBuiltinAttrs(EvalState & state, const PosIdx

static void parseTecnixRepoArgs(EvalState & state, const PosIdx pos, const Bindings & attrs, TecnixArgs & result)
{
auto gitDirAttr = attrs.get(state.s.gitDir);
auto gitDirAttr = attrs.get(state.symbols.create("gitDir"));
if (!gitDirAttr)
state.error<EvalError>("'gitDir' attribute required").atPos(pos).debugThrow();
result.gitDir =
std::string(state.forceStringNoCtx(*gitDirAttr->value, pos, "while evaluating the 'gitDir' argument"));

auto resolverAttr = attrs.get(state.s.resolver);
auto resolverAttr = attrs.get(state.symbols.create("resolver"));
if (!resolverAttr)
state.error<EvalError>("'resolver' attribute required").atPos(pos).debugThrow();
result.resolver =
std::string(state.forceStringNoCtx(*resolverAttr->value, pos, "while evaluating the 'resolver' argument"));

auto checkoutPathAttr = attrs.get(state.s.checkoutPath);
auto checkoutPathAttr = attrs.get(state.symbols.create("checkoutPath"));
if (checkoutPathAttr)
result.checkoutPath = std::string(
state.forceStringNoCtx(*checkoutPathAttr->value, pos, "while evaluating the 'checkoutPath' argument"));
Expand Down Expand Up @@ -273,7 +273,7 @@ parseTecnixResolverArgsValue(EvalState & state, const PosIdx pos, const Bindings

static std::vector<std::string> parseTecnixTargets(EvalState & state, const PosIdx pos, const Bindings & attrs)
{
auto targetsAttr = attrs.get(state.s.targets);
auto targetsAttr = attrs.get(state.symbols.create("targets"));
if (!targetsAttr)
state.error<EvalError>("'targets' attribute required").atPos(pos).debugThrow();

Expand Down
Loading