diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2021-04-05 18:29:52 -0400 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2021-04-05 18:29:52 -0400 |
commit | e12308dd63f0ad27b22dcdb3da89c411eebcad2b (patch) | |
tree | ce5a9b558ca9a2787e44614d7cd423f2d9318618 /src/libcmd | |
parent | f0ad29acc1f2c9e82679c3af434a8bf185f36b94 (diff) | |
parent | a07dc7e0d99d1cd91643c9ecc2b672399471eaf4 (diff) |
Merge branch 'master' into path-info
Diffstat (limited to 'src/libcmd')
-rw-r--r-- | src/libcmd/command.hh | 2 | ||||
-rw-r--r-- | src/libcmd/installables.cc | 9 |
2 files changed, 10 insertions, 1 deletions
diff --git a/src/libcmd/command.hh b/src/libcmd/command.hh index c02193924..e66c697eb 100644 --- a/src/libcmd/command.hh +++ b/src/libcmd/command.hh @@ -48,6 +48,8 @@ struct EvalCommand : virtual StoreCommand, MixEvalArgs ref<EvalState> getEvalState(); std::shared_ptr<EvalState> evalState; + + ~EvalCommand(); }; struct MixFlakeOptions : virtual Args, EvalCommand diff --git a/src/libcmd/installables.cc b/src/libcmd/installables.cc index 4739dc974..898e642a5 100644 --- a/src/libcmd/installables.cc +++ b/src/libcmd/installables.cc @@ -111,10 +111,11 @@ MixFlakeOptions::MixFlakeOptions() addFlag({ .longName = "override-input", - .description = "Override a specific flake input (e.g. `dwarffs/nixpkgs`).", + .description = "Override a specific flake input (e.g. `dwarffs/nixpkgs`). This implies `--no-write-lock-file`.", .category = category, .labels = {"input-path", "flake-url"}, .handler = {[&](std::string inputPath, std::string flakeRef) { + lockFlags.writeLockFile = false; lockFlags.inputOverrides.insert_or_assign( flake::parseInputPath(inputPath), parseFlakeRef(flakeRef, absPath("."))); @@ -280,6 +281,12 @@ ref<EvalState> EvalCommand::getEvalState() return ref<EvalState>(evalState); } +EvalCommand::~EvalCommand() +{ + if (evalState) + evalState->printStats(); +} + void completeFlakeRef(ref<Store> store, std::string_view prefix) { if (prefix == "") |