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.cc6
1 files changed, 3 insertions, 3 deletions
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));
}
}
}