aboutsummaryrefslogtreecommitdiff
path: root/src/nix/show-derivation.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/nix/show-derivation.cc')
-rw-r--r--src/nix/show-derivation.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nix/show-derivation.cc b/src/nix/show-derivation.cc
index b5434f982..9fd26e2d7 100644
--- a/src/nix/show-derivation.cc
+++ b/src/nix/show-derivation.cc
@@ -69,10 +69,10 @@ struct CmdShowDerivation : InstallablesCommand
auto outputsObj(drvObj.object("outputs"));
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.hash->printMethodAlgo());
- outputObj.attr("hash", output.second.hash->hash.to_string(Base16, false));
+ outputObj.attr("path", store->printStorePath(output.second.path(*store, drv.name)));
+ if (auto hash = std::get_if<DerivationOutputFixed>(&output.second.output)) {
+ outputObj.attr("hashAlgo", hash->hash.printMethodAlgo());
+ outputObj.attr("hash", hash->hash.hash.to_string(Base16, false));
}
}
}