1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-12-16 05:51:05 +01:00

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

This commit is contained in:
Eelco Dolstra 2019-11-04 22:29:31 +01:00
commit b81d9d26f5
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
39 changed files with 995 additions and 923 deletions

View file

@ -245,7 +245,17 @@ static void _main(int argc, char * * argv)
auto state = std::make_unique<EvalState>(myArgs.searchPath, store);
state->repair = repair;
Bindings & autoArgs = *myArgs.getAutoArgs(*state);
auto autoArgs = myArgs.getAutoArgs(*state);
if (runEnv) {
auto newArgs = state->allocBindings(autoArgs->size() + 1);
auto tru = state->allocValue();
mkBool(*tru, true);
newArgs->push_back(Attr(state->symbols.create("inNixShell"), tru));
for (auto & i : *autoArgs) newArgs->push_back(i);
newArgs->sort();
autoArgs = newArgs;
}
if (packages) {
std::ostringstream joined;
@ -299,9 +309,9 @@ static void _main(int argc, char * * argv)
state->eval(e, vRoot);
for (auto & i : attrPaths) {
Value & v(*findAlongAttrPath(*state, i, autoArgs, vRoot));
Value & v(*findAlongAttrPath(*state, i, *autoArgs, vRoot));
state->forceValue(v);
getDerivations(*state, v, "", autoArgs, drvs, false);
getDerivations(*state, v, "", *autoArgs, drvs, false);
}
}