1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-12-02 23:20:59 +01:00

Make a few more things use StoreDirConfig instead of Store

This commit is contained in:
John Ericson 2025-08-15 14:55:47 -04:00
parent 316fef35dc
commit 79fb9b0d3c
11 changed files with 45 additions and 38 deletions

View file

@ -6,7 +6,7 @@
namespace nix {
NarInfo::NarInfo(const Store & store, const std::string & s, const std::string & whence)
NarInfo::NarInfo(const StoreDirConfig & store, const std::string & s, const std::string & whence)
: ValidPathInfo(StorePath(StorePath::dummy), Hash(Hash::dummy)) // FIXME: hack
{
unsigned line = 1;
@ -102,7 +102,7 @@ NarInfo::NarInfo(const Store & store, const std::string & s, const std::string &
}
}
std::string NarInfo::to_string(const Store & store) const
std::string NarInfo::to_string(const StoreDirConfig & store) const
{
std::string res;
res += "StorePath: " + store.printStorePath(path) + "\n";
@ -130,7 +130,7 @@ std::string NarInfo::to_string(const Store & store) const
return res;
}
nlohmann::json NarInfo::toJSON(const Store & store, bool includeImpureInfo, HashFormat hashFormat) const
nlohmann::json NarInfo::toJSON(const StoreDirConfig & store, bool includeImpureInfo, HashFormat hashFormat) const
{
using nlohmann::json;
@ -150,7 +150,7 @@ nlohmann::json NarInfo::toJSON(const Store & store, bool includeImpureInfo, Hash
return jsonObject;
}
NarInfo NarInfo::fromJSON(const Store & store, const StorePath & path, const nlohmann::json & json)
NarInfo NarInfo::fromJSON(const StoreDirConfig & store, const StorePath & path, const nlohmann::json & json)
{
using nlohmann::detail::value_t;