12
12
namespace nix {
13
13
14
14
class Store ;
15
+ struct StoreDirConfig ;
15
16
16
17
struct SubstitutablePathInfo
17
18
{
@@ -116,8 +117,8 @@ struct UnkeyedValidPathInfo
116
117
* @param includeImpureInfo If true, variable elements such as the
117
118
* registration time are included.
118
119
*/
119
- virtual nlohmann::json toJSON (const Store & store, bool includeImpureInfo, HashFormat hashFormat) const ;
120
- static UnkeyedValidPathInfo fromJSON (const Store & store, const nlohmann::json & json);
120
+ virtual nlohmann::json toJSON (const StoreDirConfig & store, bool includeImpureInfo, HashFormat hashFormat) const ;
121
+ static UnkeyedValidPathInfo fromJSON (const StoreDirConfig & store, const nlohmann::json & json);
121
122
};
122
123
123
124
struct ValidPathInfo : UnkeyedValidPathInfo
@@ -135,7 +136,7 @@ struct ValidPathInfo : UnkeyedValidPathInfo
135
136
* speaking superfluous, but might prevent endless/excessive data
136
137
* attacks.
137
138
*/
138
- std::string fingerprint (const Store & store) const ;
139
+ std::string fingerprint (const StoreDirConfig & store) const ;
139
140
140
141
void sign (const Store & store, const Signer & signer);
141
142
void sign (const Store & store, const std::vector<std::unique_ptr<Signer>> & signers);
@@ -150,7 +151,7 @@ struct ValidPathInfo : UnkeyedValidPathInfo
150
151
/* *
151
152
* @return true iff the path is verifiably content-addressed.
152
153
*/
153
- bool isContentAddressed (const Store & store) const ;
154
+ bool isContentAddressed (const StoreDirConfig & store) const ;
154
155
155
156
static const size_t maxSigs = std::numeric_limits<size_t >::max();
156
157
@@ -159,12 +160,12 @@ struct ValidPathInfo : UnkeyedValidPathInfo
159
160
* produced by one of the specified keys, or maxSigs if the path
160
161
* is content-addressed.
161
162
*/
162
- size_t checkSignatures (const Store & store, const PublicKeys & publicKeys) const ;
163
+ size_t checkSignatures (const StoreDirConfig & store, const PublicKeys & publicKeys) const ;
163
164
164
165
/* *
165
166
* Verify a single signature.
166
167
*/
167
- bool checkSignature (const Store & store, const PublicKeys & publicKeys, const std::string & sig) const ;
168
+ bool checkSignature (const StoreDirConfig & store, const PublicKeys & publicKeys, const std::string & sig) const ;
168
169
169
170
/* *
170
171
* References as store path basenames, including a self reference if it has one.
@@ -178,7 +179,8 @@ struct ValidPathInfo : UnkeyedValidPathInfo
178
179
: UnkeyedValidPathInfo(info)
179
180
, path(path) {};
180
181
181
- ValidPathInfo (const Store & store, std::string_view name, ContentAddressWithReferences && ca, Hash narHash);
182
+ ValidPathInfo (
183
+ const StoreDirConfig & store, std::string_view name, ContentAddressWithReferences && ca, Hash narHash);
182
184
};
183
185
184
186
static_assert (std::is_move_assignable_v<ValidPathInfo>);
0 commit comments