split <2.34 code in cmake
This commit is contained in:
parent
df23fb0436
commit
70b537244d
2 changed files with 23 additions and 9 deletions
27
scope.cc
27
scope.cc
|
|
@ -40,13 +40,22 @@ static void prim_scope(EvalState & state, const PosIdx pos, Value ** args, Value
|
|||
v = *inner;
|
||||
}
|
||||
|
||||
static RegisterPrimOp rp(PrimOp{
|
||||
.name = "scope",
|
||||
.args = {"path", "value"},
|
||||
.doc = R"(
|
||||
Construct a nested attribute set from a dotted string path and a value.
|
||||
static RegisterPrimOp rp(
|
||||
#ifndef NIX_PRE_234
|
||||
PrimOp
|
||||
#endif
|
||||
{
|
||||
.name = "scope",
|
||||
.args = {"path", "value"},
|
||||
.doc = R"(
|
||||
Construct a nested attribute set from a dotted string path and a value.
|
||||
|
||||
Example: `scope "a.b.c" 42` evaluates to `{ a = { b = { c = 42; }; }; }`.
|
||||
)",
|
||||
.impl = prim_scope,
|
||||
});
|
||||
Example: `scope "a.b.c" 42` evaluates to `{ a = { b = { c = 42; }; }; }`.
|
||||
)",
|
||||
#ifdef NIX_PRE_234
|
||||
.fun = prim_scope,
|
||||
#else
|
||||
.impl = prim_scope,
|
||||
#endif
|
||||
}
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue