1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-26 15:51:15 +02:00

Merge remote-tracking branch 'origin/master' into flakes

This commit is contained in:
Eelco Dolstra 2019-12-04 00:31:09 +01:00
commit c3c23a52ee
76 changed files with 1387 additions and 631 deletions

View file

@ -469,7 +469,7 @@ static void prim_tryEval(EvalState & state, const Pos & pos, Value * * args, Val
static void prim_getEnv(EvalState & state, const Pos & pos, Value * * args, Value & v)
{
string name = state.forceStringNoCtx(*args[0], pos);
mkString(v, evalSettings.restrictEval || evalSettings.pureEval ? "" : getEnv(name));
mkString(v, evalSettings.restrictEval || evalSettings.pureEval ? "" : getEnv(name).value_or(""));
}
@ -506,13 +506,6 @@ static void prim_trace(EvalState & state, const Pos & pos, Value * * args, Value
}
void prim_valueSize(EvalState & state, const Pos & pos, Value * * args, Value & v)
{
/* We're not forcing the argument on purpose. */
mkInt(v, valueSize(*args[0]));
}
/*************************************************************
* Derivations
*************************************************************/
@ -2206,7 +2199,6 @@ void EvalState::createBaseEnv()
// Debugging
addPrimOp("__trace", 2, prim_trace);
addPrimOp("__valueSize", 1, prim_valueSize);
// Paths
addPrimOp("__toPath", 1, prim_toPath);