diff options
author | regnat <rg@regnat.ovh> | 2021-11-03 10:54:17 +0100 |
---|---|---|
committer | regnat <rg@regnat.ovh> | 2021-11-05 11:04:14 +0100 |
commit | 1a4c9ba50bb36ab5d18f47b0d00052d274ed824f (patch) | |
tree | bd97dbbb18d6dfc42ee62aebddb3548b29792413 /src | |
parent | 886ad0055f20ca70247b1290759903f244c27f88 (diff) |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/nix/repl.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nix/repl.cc b/src/nix/repl.cc index 9c0d22438..bc31cf1d4 100644 --- a/src/nix/repl.cc +++ b/src/nix/repl.cc @@ -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 { |