diff options
author | Matthew Bauer <mjbauer95@gmail.com> | 2020-06-19 14:22:06 -0400 |
---|---|---|
committer | Matthew Bauer <mjbauer95@gmail.com> | 2020-06-19 14:22:06 -0400 |
commit | 2796b01e863bf3a6d28cc89bb46c6388d8b73fbc (patch) | |
tree | 20fec553f605b3a6f7474cd337eb457c9a8a56f1 /src/nix | |
parent | 5e631e3304aaf00b912c12025debfd35942a0ca9 (diff) | |
parent | 424bb5819f736af7413c343d462663474222eaac (diff) |
Merge remote-tracking branch 'origin/master' into substitute-other-storedir
Diffstat (limited to 'src/nix')
-rw-r--r-- | src/nix/develop.cc | 8 | ||||
-rw-r--r-- | src/nix/show-derivation.cc | 6 |
2 files changed, 10 insertions, 4 deletions
diff --git a/src/nix/develop.cc b/src/nix/develop.cc index 05a9b9cd9..8b85caf82 100644 --- a/src/nix/develop.cc +++ b/src/nix/develop.cc @@ -135,7 +135,13 @@ StorePath getDerivationEnvironment(ref<Store> store, const StorePath & drvPath) drv.inputSrcs.insert(std::move(getEnvShPath)); Hash h = hashDerivationModulo(*store, drv, true); auto shellOutPath = store->makeOutputPath("out", h, drvName); - drv.outputs.insert_or_assign("out", DerivationOutput { shellOutPath, "", "" }); + drv.outputs.insert_or_assign("out", DerivationOutput { + .path = shellOutPath, + .hash = DerivationOutputHash { + .method = FileIngestionMethod::Flat, + .hash = Hash { }, + }, + }); drv.env["out"] = store->printStorePath(shellOutPath); auto shellDrvPath2 = writeDerivation(store, drv, drvName); diff --git a/src/nix/show-derivation.cc b/src/nix/show-derivation.cc index 2d31894c2..5d77cfdca 100644 --- a/src/nix/show-derivation.cc +++ b/src/nix/show-derivation.cc @@ -70,9 +70,9 @@ struct CmdShowDerivation : InstallablesCommand for (auto & output : drv.outputs) { auto outputObj(outputsObj.object(output.first)); outputObj.attr("path", store->printStorePath(output.second.path)); - if (output.second.hash != "") { - outputObj.attr("hashAlgo", output.second.hashAlgo); - outputObj.attr("hash", output.second.hash); + if (output.second.hash) { + outputObj.attr("hashAlgo", output.second.hash->printMethodAlgo()); + outputObj.attr("hash", output.second.hash->hash.to_string(Base16, false)); } } } |