Skip to content

Make storeDir a part of UnkeyedValidPathInfo#14707

Merged
Ericson2314 merged 1 commit into
NixOS:masterfrom
obsidiansystems:store-dir-in-info
Dec 8, 2025
Merged

Make storeDir a part of UnkeyedValidPathInfo#14707
Ericson2314 merged 1 commit into
NixOS:masterfrom
obsidiansystems:store-dir-in-info

Conversation

@Ericson2314
Copy link
Copy Markdown
Member

Motivation

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).

Context

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. ( Relocatable store objects #9549)


Add 👍 to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

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. (NixOS#9549)
@Ericson2314 Ericson2314 requested a review from edolstra as a code owner December 4, 2025 04:23
@github-actions github-actions Bot added documentation new-cli Relating to the "nix" command with-tests Issues related to testing. PRs with tests have some priority store Issues and pull requests concerning the Nix store labels Dec 4, 2025
Comment thread src/libstore/include/nix/store/path-info.hh
@Ericson2314 Ericson2314 added this pull request to the merge queue Dec 8, 2025
Merged via the queue into NixOS:master with commit 907a576 Dec 8, 2025
16 checks passed
@Ericson2314 Ericson2314 deleted the store-dir-in-info branch December 8, 2025 18:42
@edolstra edolstra mentioned this pull request Dec 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation new-cli Relating to the "nix" command store Issues and pull requests concerning the Nix store with-tests Issues related to testing. PRs with tests have some priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants