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.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nix/show-derivation.cc b/src/nix/show-derivation.cc
index 5d77cfdca..9fd26e2d7 100644
--- a/src/nix/show-derivation.cc
+++ b/src/nix/show-derivation.cc
@@ -33,7 +33,7 @@ struct CmdShowDerivation : InstallablesCommand
return {
Example{
"To show the store derivation that results from evaluating the Hello package:",
- "nix show-derivation nixpkgs.hello"
+ "nix show-derivation nixpkgs#hello"
},
Example{
"To show the full derivation graph (if available) that produced your NixOS system:",
@@ -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));
}
}
}