1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-24 18:01:16 +02:00
nix/doc/manual/rl-next/deprecate__json.md
John Ericson 7577d2d3ae Deprecate hacky way of making structured attrs
The method tested for in the previous commit is now deprecated.

Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
2025-05-28 12:59:04 -04:00

691 B

synopsis prs
Deprecate manually making structured attrs with `__json = ...;`
13220

The proper way to create a derivation using structured attrs in the Nix language is by using __structuredAttrs = true with builtins.derivation. However, by exploiting how structured attrs are implementated, it has also been possible to create them by setting the __json environment variable to a serialized JSON string. This sneaky alternative method is now deprecated, and may be disallowed in future versions of Nix.