1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-13 05:56:03 +01:00
nix/src
Maximilian Bosch 0c5333a4f6
build: backport NIX_ATTRS_*_FILE
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] f4bd97b8fa/lib/minver.nix
[2] https://github.com/NixOS/nixpkgs/pull/357053/files#diff-791a01ef89c157eb74d9c87ab8cbc3b81e2cf082cab70b8fec3472cd75ce860dR3-R5
[3] https://github.com/NixOS/nixpkgs/pull/357053#discussion_r1857362490
2024-12-08 15:45:05 +01:00
..
build-remote distributed builds: load remote builder host key from the machines file 2021-02-25 11:11:07 -05:00
cpptoml bump cpptoml to v0.1.1 2019-05-29 17:01:39 +08:00
libexpr Escape ${ in strings when printing Nix expressions 2023-10-31 12:06:50 +02:00
libmain preloadNSS: rework the dns query workaround 2021-11-25 13:06:00 -08:00
libstore build: backport NIX_ATTRS_*_FILE 2024-12-08 15:45:05 +01:00
libutil libutil: add ZstdDecompressionSink 2023-10-23 17:36:13 +00:00
nix repl.cc: Check for HAVE_BOEHMGC 2020-08-13 04:34:36 +02:00
nix-build nix-shell: don't check for "nix-shell" in shebang script name 2021-11-30 05:33:50 +00:00
nix-channel nix-env: Create ~/.nix-profile automatically 2019-10-10 00:00:54 +02:00
nix-collect-garbage Merge all nix-* binaries into nix 2018-10-26 12:54:00 +02:00
nix-copy-closure Merge all nix-* binaries into nix 2018-10-26 12:54:00 +02:00
nix-daemon Fix SO_PEERCRED usage on OpenBSD 2023-03-11 23:07:19 +04:00
nix-env Fix insufficent attribute capacity in user profile 2021-03-13 17:32:47 +00:00
nix-instantiate Merge all nix-* binaries into nix 2018-10-26 12:54:00 +02:00
nix-prefetch-url nix-prefetch-url: Stop progress bar before printing results 2018-11-09 10:34:12 +01:00
nix-store nix-store: fix out of sync protocol 2019-08-16 15:05:45 +02:00
nlohmann nlohmann-json: 3.4.0 -> 3.5.0 2018-12-21 22:38:06 -06:00
resolve-system-dependencies Apply OS checks to host platform, not build 2021-07-27 08:41:57 +00:00