about summary refs log tree commit diff
path: root/third_party/nix/src/libstore/derivations.cc
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/nix/src/libstore/derivations.cc')
-rw-r--r--third_party/nix/src/libstore/derivations.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/third_party/nix/src/libstore/derivations.cc b/third_party/nix/src/libstore/derivations.cc
index 208e7e981c4a..243aa0a242f7 100644
--- a/third_party/nix/src/libstore/derivations.cc
+++ b/third_party/nix/src/libstore/derivations.cc
@@ -13,6 +13,7 @@
 
 namespace nix {
 
+// TODO(#statusor): looks like easy absl::Status conversion
 void DerivationOutput::parseHashInfo(bool& recursive, Hash& hash) const {
   recursive = false;
   std::string algo = hashAlgo;
@@ -27,7 +28,8 @@ void DerivationOutput::parseHashInfo(bool& recursive, Hash& hash) const {
     throw Error(format("unknown hash algorithm '%1%'") % algo);
   }
 
-  hash = Hash(this->hash, hashType);
+  auto hash_ = Hash::deserialize(this->hash, hashType);
+  hash = Hash::unwrap_throw(hash_);
 }
 
 BasicDerivation BasicDerivation::from_proto(