nix develop: Support derivations with multiple outputs

This commit is contained in:
Eelco Dolstra
2020-07-06 18:34:58 +02:00
parent cd8eb8a7d1
commit 68f524d717
3 changed files with 12 additions and 0 deletions
+2
View File
@@ -130,7 +130,9 @@ StorePath getDerivationEnvironment(ref<Store> store, const StorePath & drvPath)
drvName += "-env";
for (auto & output : drv.outputs)
drv.env.erase(output.first);
drv.outputs = {{"out", DerivationOutput { .path = StorePath::dummy }}};
drv.env["out"] = "";
drv.env["_outputs_saved"] = drv.env["outputs"];
drv.env["outputs"] = "out";
drv.inputSrcs.insert(std::move(getEnvShPath));
Hash h = hashDerivationModulo(*store, drv, true);