mirror of
https://github.com/NixOS/nix.git
synced 2025-11-13 05:56:03 +01:00
This was originally added in #4770 to support structured attrs in
`nix-shell` & `nix develop`: the issue was that it was somewhat awkward
to just write those files into a project directory, especially since
it'd break in case of multiple `nix-shell` invocations from the same
directory. Now the files are written to another, temporary
location when using `nix-shell`/`nix develop` and the correct path is
referenced by NIX_ATTRS_*_FILE.
In `nixpkgs`, it's now common to use these environment variables,
however we still fall back to checking to `.attrs.sh` & `.attrs.json`
since the minimum Nix version we support is 2.3.17[1] which doesn't have
this change.
This however makes implementing structured attrs support more
complicated than needed[2] and in fact we have a few places where the
check for `.attrs.sh`/`.attrs.json` isn't made, so these only break with
Nix 2.3[3].
The idea is now to
* get this into 2.3.18
* bump minver once again to 2.3.18 in nixpkgs
* remove all occurrences of `.attrs.sh`/`.attrs.json` from nixpkgs.
[1]
|
||
|---|---|---|
| .. | ||
| build-remote | ||
| cpptoml | ||
| libexpr | ||
| libmain | ||
| libstore | ||
| libutil | ||
| nix | ||
| nix-build | ||
| nix-channel | ||
| nix-collect-garbage | ||
| nix-copy-closure | ||
| nix-daemon | ||
| nix-env | ||
| nix-instantiate | ||
| nix-prefetch-url | ||
| nix-store | ||
| nlohmann | ||
| resolve-system-dependencies | ||