1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-12-24 01:41:08 +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.

(cherry picked from commit 0f18076f3a)
This commit is contained in:
John Ericson 2025-12-10 15:30:12 -05:00 committed by Eelco Dolstra
parent 72f62e1b19
commit 231d5b41ed
9 changed files with 34 additions and 11 deletions

View file

@ -4,7 +4,7 @@ source common.sh
drvPath=$(nix-instantiate simple.nix)
nix derivation show "$drvPath" | jq '.[]' > "$TEST_HOME/simple.json"
nix derivation show "$drvPath" | jq '.derivations[]' > "$TEST_HOME/simple.json"
# Round tripping to JSON works
drvPath2=$(nix derivation add < "$TEST_HOME/simple.json")