From c71f80b6ebedd481b4e2d360463e5466d392ba19 Mon Sep 17 00:00:00 2001 From: Sergei Zimmerman Date: Mon, 22 Sep 2025 01:16:52 +0300 Subject: [PATCH] libstore: Implement boost::hash for StorePath --- src/libstore/include/nix/store/path.hh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/libstore/include/nix/store/path.hh b/src/libstore/include/nix/store/path.hh index 8124cf580..74ee0422b 100644 --- a/src/libstore/include/nix/store/path.hh +++ b/src/libstore/include/nix/store/path.hh @@ -108,4 +108,13 @@ struct hash } // namespace std +namespace nix { + +inline std::size_t hash_value(const StorePath & path) +{ + return std::hash{}(path); +} + +} // namespace nix + JSON_IMPL(nix::StorePath)