mirror of
https://github.com/NixOS/nix
synced 2025-06-30 07:33:16 +02:00
Fix nix repl
’s building of CA derivations
When running a `:b` command in the repl, after building the derivations query the store for its outputs rather than just assuming that they are known in the derivation itself (which isn’t true for CA derivations) Fix #5328
This commit is contained in:
parent
886ad0055f
commit
1a4c9ba50b
4 changed files with 11 additions and 4 deletions
|
@ -504,8 +504,8 @@ bool NixRepl::processLine(string line)
|
|||
state->store->buildPaths({DerivedPath::Built{drvPath}});
|
||||
auto drv = state->store->readDerivation(drvPath);
|
||||
logger->cout("\nThis derivation produced the following outputs:");
|
||||
for (auto & i : drv.outputsAndOptPaths(*state->store))
|
||||
logger->cout(" %s -> %s", i.first, state->store->printStorePath(*i.second.second));
|
||||
for (auto & [outputName, outputPath] : state->store->queryDerivationOutputMap(drvPath))
|
||||
logger->cout(" %s -> %s", outputName, state->store->printStorePath(outputPath));
|
||||
} else if (command == ":i") {
|
||||
runNix("nix-env", {"-i", drvPathRaw});
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue