aboutsummaryrefslogtreecommitdiff
path: root/src/nix/show-derivation.cc
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2020-07-27 16:17:50 +0000
committerJohn Ericson <John.Ericson@Obsidian.Systems>2020-07-27 16:17:50 +0000
commit1d7d94ceea0dbed564a5c3812f00be7fdaf1aa52 (patch)
tree6d197c708e6006965f16cd219b2012d403eaf584 /src/nix/show-derivation.cc
parent66a2067288a86dae19aecfa9e6a5b2d37952669f (diff)
parent43f2bd8dc5950c38a817242884870f344a84a291 (diff)
Merge branch 'hash-always-has-type' of github.com:obsidiansystems/nix into better-ca-parse-errors
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));
}
}
}