1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-12-11 19:41:04 +01:00

Make storeDir a part of UnkeyedValidPathInfo

The previous commit hacked it into the output of `nix path-info --json`,
this cleans that up my making it an actual field of that data type, and
part of the canonical JSON serializers for it (and `ValidPathInfo` and
`NarInfo`).

Beyond cleaning up the JSON code, this also opens the doors to things
like:

- Binary caches that contain store objects that don't all belong in the
  same store directory

- Relocatable store objects which carefully don't mention any store
  directory by absolute path, and instead use relative paths for
  anything. (#9549)
This commit is contained in:
John Ericson 2025-12-03 20:20:21 -05:00
parent 1ad13a1423
commit f9089deb20
36 changed files with 111 additions and 29 deletions

View file

@ -78,7 +78,7 @@ UnkeyedValidPathInfo ServeProto::Serialise<UnkeyedValidPathInfo>::read(const Sto
{
/* Hash should be set below unless very old `nix-store --serve`.
Caller should assert that it did set it. */
UnkeyedValidPathInfo info{Hash::dummy};
UnkeyedValidPathInfo info{store, Hash::dummy};
auto deriver = readString(conn.from);
if (deriver != "")