1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-12 21:46:01 +01:00
Nix, the purely functional package manager
Find a file
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
.github Add GitHub actions CI for PRs 2021-11-29 23:18:01 +00:00
config Update config.guess for proper arm64 macOS detection 2020-12-04 12:22:31 +01:00
contrib function-trace: always show the trace 2020-01-05 16:30:32 +01:00
corepkgs nix-channel: Don't fetch binary-cache-url 2019-06-25 13:27:16 +02:00
doc/manual Add release notes 2024-03-01 10:24:54 +01:00
m4 autoconf: Fix C++17 detection not working on Ubuntu 16.04. 2019-07-03 04:32:25 +02:00
maintainers upload-release.pl: add aarch64-darwin 2021-07-02 14:13:26 +02:00
misc Apply OS checks to host platform, not build 2021-07-27 08:41:57 +00:00
mk Close stdin while running tests 2021-11-30 05:33:50 +00:00
perl Apply OS checks to host platform, not build 2021-07-27 08:41:57 +00:00
scripts Create to daemon-socket folder during install 2023-10-26 14:31:46 +02:00
src build: backport NIX_ATTRS_*_FILE 2024-12-08 15:45:05 +01:00
tests build: backport NIX_ATTRS_*_FILE 2024-12-08 15:45:05 +01:00
.dir-locals.el Add .dir-locals.el for Emacs 2016-01-28 11:12:04 +01:00
.editorconfig Add .editorconfig 2017-06-05 22:57:28 +01:00
.gitignore Treat plain derivation paths in context as normal paths. 2019-01-13 11:29:55 -05:00
.travis.yml Test the installer 2017-07-14 12:11:04 -04:00
.version Bump version 2023-11-03 18:05:47 +01:00
bootstrap.sh bootstrap: Simplify & make more robust. 2011-09-06 12:11:05 +00:00
configure.ac libutil: add ZstdDecompressionSink 2023-10-23 17:36:13 +00:00
COPYING * Change this to LGPL to keep the government happy. 2006-04-25 16:41:06 +00:00
flake.lock Add best-effort flake.nix 2024-01-15 10:40:48 +01:00
flake.nix Add best-effort flake.nix 2024-01-15 10:40:48 +01:00
local.mk Merge all nix-* binaries into nix 2018-10-26 12:54:00 +02:00
Makefile autoconf: Allow overriding CFLAGS/CXXFLAGS from outside. 2019-07-03 04:32:25 +02:00
Makefile.config.in libutil: add ZstdDecompressionSink 2023-10-23 17:36:13 +00:00
nix.spec.in libutil: add ZstdDecompressionSink 2023-10-23 17:36:13 +00:00
README.md README, error msg: http -> https 2020-05-26 11:39:02 +02:00
release-common.nix Address removal of pkgconfig alias 2023-10-31 12:22:36 +02:00
release.nix Add a NixOS test for the sandbox escape 2024-03-01 10:24:54 +01:00
shell.nix Build with large config Boehm GC 2020-02-18 18:02:58 +01:00

Open Collective supporters

Nix, the purely functional package manager

Nix is a new take on package management that is fairly unique. Because of its purity aspects, a lot of issues found in traditional package managers don't appear with Nix.

To find out more about the tool, usage and installation instructions, please read the manual, which is available on the Nix website at https://nixos.org/nix/manual.

Contributing

Take a look at the Hacking Section of the manual. It helps you to get started with building Nix from source.

License

Nix is released under the LGPL v2.1

This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit.