mirror of
https://github.com/NixOS/nix
synced 2025-06-25 10:41:16 +02:00
Merge pull request #12759 from roberth/c-api-libflake-settings
C API / settings: remove nix-flake-c global init
This commit is contained in:
commit
a26a15d05c
20 changed files with 277 additions and 189 deletions
|
@ -4675,7 +4675,7 @@ RegisterPrimOp::RegisterPrimOp(PrimOp && primOp)
|
|||
}
|
||||
|
||||
|
||||
void EvalState::createBaseEnv()
|
||||
void EvalState::createBaseEnv(const EvalSettings & evalSettings)
|
||||
{
|
||||
baseEnv.up = 0;
|
||||
|
||||
|
@ -4934,6 +4934,12 @@ void EvalState::createBaseEnv()
|
|||
addPrimOp(std::move(primOpAdjusted));
|
||||
}
|
||||
|
||||
for (auto & primOp : evalSettings.extraPrimOps) {
|
||||
auto primOpAdjusted = primOp;
|
||||
primOpAdjusted.arity = std::max(primOp.args.size(), primOp.arity);
|
||||
addPrimOp(std::move(primOpAdjusted));
|
||||
}
|
||||
|
||||
/* Add a wrapper around the derivation primop that computes the
|
||||
`drvPath' and `outPath' attributes lazily.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue