diff --git a/src/nix/command.hh b/src/nix/command.hh index c362f9daa..5e4b0f399 100644 --- a/src/nix/command.hh +++ b/src/nix/command.hh @@ -75,6 +75,8 @@ struct Installable struct SourceExprCommand : virtual Args, StoreCommand, MixEvalArgs { + friend void mainWrapped(int argc, char * * argv); + Path file; SourceExprCommand(); diff --git a/src/nix/main.cc b/src/nix/main.cc index de429eba7..803f1ef80 100644 --- a/src/nix/main.cc +++ b/src/nix/main.cc @@ -102,6 +102,11 @@ void mainWrapped(int argc, char * * argv) args.command->prepare(); args.command->run(); + + auto c = dynamic_cast(&*args.command); + if (c && c->evalState) { + c->evalState->printStats(); + } } }