diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2023-01-11 16:32:30 -0500 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2023-01-11 19:08:19 -0500 |
commit | 5ba6e5d0d9bed2806ddb59c8a3305b3cb5784d53 (patch) | |
tree | 065e7eccec8a228a4045a434c4d5a1de5aa0cf3b /src/libcmd | |
parent | 114a6e2b09eda7f23e7776e1cdf77715044e073e (diff) |
Remove default constructor from `OutputsSpec`
This forces us to be explicit.
It also requires to rework how `from_json` works. A `JSON_IMPL` is added
to assist with this.
Diffstat (limited to 'src/libcmd')
-rw-r--r-- | src/libcmd/installables.cc | 2 | ||||
-rw-r--r-- | src/libcmd/repl.cc | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/libcmd/installables.cc b/src/libcmd/installables.cc index 3457f2e47..d73109873 100644 --- a/src/libcmd/installables.cc +++ b/src/libcmd/installables.cc @@ -827,7 +827,7 @@ std::vector<std::shared_ptr<Installable>> SourceExprCommand::parseInstallables( return storePath.isDerivation() ? (DerivedPath) DerivedPath::Built { .drvPath = std::move(storePath), - .outputs = {}, + .outputs = OutputsSpec::All {}, } : (DerivedPath) DerivedPath::Opaque { .path = std::move(storePath), diff --git a/src/libcmd/repl.cc b/src/libcmd/repl.cc index 71a7e079a..9b12f8fa2 100644 --- a/src/libcmd/repl.cc +++ b/src/libcmd/repl.cc @@ -641,7 +641,12 @@ bool NixRepl::processLine(std::string line) Path drvPathRaw = state->store->printStorePath(drvPath); if (command == ":b" || command == ":bl") { - state->store->buildPaths({DerivedPath::Built{drvPath}}); + state->store->buildPaths({ + DerivedPath::Built { + .drvPath = drvPath, + .outputs = OutputsSpec::All { }, + }, + }); auto drv = state->store->readDerivation(drvPath); logger->cout("\nThis derivation produced the following outputs:"); for (auto & [outputName, outputPath] : state->store->queryDerivationOutputMap(drvPath)) { |