about summary refs log tree commit diff
path: root/third_party/nix/src/libstore/rpc-store.cc
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/nix/src/libstore/rpc-store.cc')
-rw-r--r--third_party/nix/src/libstore/rpc-store.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/third_party/nix/src/libstore/rpc-store.cc b/third_party/nix/src/libstore/rpc-store.cc
index 6d31f1aa81..e2eb240f8b 100644
--- a/third_party/nix/src/libstore/rpc-store.cc
+++ b/third_party/nix/src/libstore/rpc-store.cc
@@ -100,7 +100,8 @@ void RpcStore::queryPathInfoUncached(
     if (!info->deriver.empty()) {
       assertStorePath(info->deriver);
     }
-    info->narHash = Hash(path_info.nar_hash(), htSHA256);
+    auto hash_ = Hash::deserialize(path_info.nar_hash(), htSHA256);
+    info->narHash = Hash::unwrap_throw(hash_);
     info->references.insert(path_info.references().begin(),
                             path_info.references().end());
     info->registrationTime =