mirror of
https://github.com/NixOS/nix
synced 2025-06-24 18:01:16 +02:00
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>
This commit is contained in:
parent
a353b2f4b2
commit
7577d2d3ae
5 changed files with 18 additions and 1 deletions
11
doc/manual/rl-next/deprecate__json.md
Normal file
11
doc/manual/rl-next/deprecate__json.md
Normal file
|
@ -0,0 +1,11 @@
|
|||
---
|
||||
synopsis: Deprecate manually making structured attrs with `__json = ...;`
|
||||
prs: [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.
|
||||
|
||||
[structured attrs]: @docroot@/language/advanced-attributes.md#adv-attr-structuredAttrs
|
||||
[`builtins.derivation`]: @docroot@/language/builtins.html#builtins-derivation
|
Loading…
Add table
Add a link
Reference in a new issue