1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-08 19:46:02 +01:00
nix/doc/manual/rl-next/derivation-json.md
John Ericson 9d7229a2a4 Make the JSON format for derivation use basename store paths
See #13570 for details --- the idea is that included the store dir in
store paths makes systematic JSON parting with e.g. Serde, Aeson,
nlohmann, or similiar harder.

After talking to Eelco, we are changing the `Derivation` format right
away because not only is `nix derivation` technically experimental, we think it is
also less widely used in practice than, say, `nix path-info`.

Progress on #13570
2025-09-17 16:38:17 -04:00

713 B

synopsis prs issues
Derivation JSON format now uses store path basenames (no store dir) only
13980
13570

Experience with many JSON frameworks (e.g. nlohmann/json in C++, Serde in Rust, and Aeson in Haskell), has show that the use of the store dir in JSON formats is an impediment to systematic JSON formats, because it requires the serializer/deserializer to take an extra paramater (the store dir).

We ultimately want to rectify this issue with all (non-stable, able to be changed) JSON formats. To start with, we are changing the JSON format for derivations because the nix derivation commands are --- in addition to being formally unstable --- less widely used than other unstable commands.