diff options
Diffstat (limited to 'src/nix/show-derivation.cc')
-rw-r--r-- | src/nix/show-derivation.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/nix/show-derivation.cc b/src/nix/show-derivation.cc index af2e676a4..9d69c19f2 100644 --- a/src/nix/show-derivation.cc +++ b/src/nix/show-derivation.cc @@ -71,15 +71,16 @@ struct CmdShowDerivation : InstallablesCommand }, [&](const DerivationOutput::CAFixed & dof) { outputObj["path"] = store->printStorePath(dof.path(*store, drv.name, outputName)); - outputObj["hashAlgo"] = dof.hash.printMethodAlgo(); - outputObj["hash"] = dof.hash.hash.to_string(Base16, false); + outputObj["hashAlgo"] = printMethodAlgo(dof.ca); + outputObj["hash"] = getContentAddressHash(dof.ca).to_string(Base16, false); + // FIXME print refs? }, [&](const DerivationOutput::CAFloating & dof) { - outputObj["hashAlgo"] = makeFileIngestionPrefix(dof.method) + printHashType(dof.hashType); + outputObj["hashAlgo"] = makeContentAddressingPrefix(dof.method) + printHashType(dof.hashType); }, [&](const DerivationOutput::Deferred &) {}, [&](const DerivationOutput::Impure & doi) { - outputObj["hashAlgo"] = makeFileIngestionPrefix(doi.method) + printHashType(doi.hashType); + outputObj["hashAlgo"] = makeContentAddressingPrefix(doi.method) + printHashType(doi.hashType); outputObj["impure"] = true; }, }, output.raw()); |