1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-12-19 15:31: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

@ -18,7 +18,7 @@ mkDerivation rec {
PATH=${builtins.getEnv "EXTRA_PATH"}:$PATH
# JSON of pre-existing drv
nix derivation show $drv | jq .[] > drv0.json
nix derivation show $drv | jq '.derivations[]' > drv0.json
# Fix name
jq < drv0.json '.name = "${innerName}"' > drv1.json