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

Bring nix derivation show in compliance with JSON guidelines

This matches what we just did for `nix path-info`, and I hope will allow
us to avoiding any more breaking changes to this command for the
foreseeable future.
This commit is contained in:
John Ericson 2025-12-10 15:30:12 -05:00
parent 8b955d80c2
commit 0f18076f3a
9 changed files with 34 additions and 11 deletions

View file

@ -180,6 +180,21 @@ Additionally the following fields are added to both formats:
The derivation JSON format has been updated from version 3 to version 4:
- **Nested structure with top-level metadata**:
The output of `nix derivation show` is now wrapped in an object with `version` and `derivations` fields:
```json
{
"version": 4,
"derivations": { ... }
}
```
The map from derivation paths to derivation info is nested under the `derivations` field.
This matches the structure used for `nix path-info --json --json-format 2`, and likewise brings this command into compliance with the JSON guidelines.
- **Restructured inputs**:
Inputs are now nested under an `inputs` object: