Without the change the eval fails as:
$ nix build --no-link -f. nixVersions.git.tests
error: attribute 'nix_2_23' missing
at pkgs/tools/package-management/nix/common.nix:252:17:
251| tests = {
252| nixi686 = pkgsi686Linux.nixVersions.${"nix_${lib.versions.major version}_${lib.versions.minor version}"};
| ^
253| };
Did you mean one of nix_2_13, nix_2_20, nix_2_21, nix_2_22 or nix_2_3?
The change explicitly passes attribute name around instead of inferring
it from package version.
While building nix on Darwin, I encountered an error in the `installCheckPhase`:
```
nix> building '/private/tmp/nix-build-nix-2.17.1.drv-1/nix-test/tests/fetchurl/store/mkc9z3arar02wi5jii655cjhdinx4npy-fetchurl.sh.drv'...
nix> waiting for children
nix> building of '/private/tmp/nix-build-nix-2.17.1.drv-1/nix-test/tests/fetchurl/store/mkc9z3arar02wi5jii655cjhdinx4npy-fetchurl.sh.drv^out' from .drv file: read 377 bytes
nix> objc[70707]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called.
nix> objc[70707]: +[__NSCFConstantString initialize] may have been in progress in another thread when fork() was called. We cannot safely call it or ignore it in the fork() child process. Crashing instead. Set a breakpoint on objc_initializeAfterForkError to debug.
nix> waiting for children
```
I noticed that #278802 should have addressed this problem, but it didn't.
The solution for me was to replace `yes` with `YES`.
As it turns out, most of the references to `OBJC_DISABLE_INITIALIZE_FORK_SAFETY` use `YES` instead of `yes`.
https://airflow.apache.org/blog/airflow-1.10.10/#running-airflow-on-macoshttp://sealiesoftware.com/blog/archive/2017/6/5/Objective-C_and_fork_in_macOS_1013.html
The objective C code that parses the environment variable is defined in
the function `environ_init` in [here](cd5e62a559/runtime/objc-runtime.mm (L265)) and it does
`*opt->var = (0 == strcmp(value, "YES"));`.
```
% nix-info -m
- system: `"aarch64-darwin"`
- host os: `Darwin 21.3.0, macOS 12.2.1`
- multi-user?: `yes`
- sandbox: `yes`
- version: `nix-env (Nix) 2.19.2`
- channels(hetzner): `"darwin, nixpkgs-22.05-darwin"`
- channels(root): `"darwin, nixpkgs-23.05-darwin"`
- nixpkgs: `/Users/hetzner/git/nixpkgs`
```
We had neglected to nice `RC_INSTALL_ALL_EXTRAS`, which will take care
of installing the "extras" for us.
Now that they are in a standard directory, we don't need to smuggle in
the extra `-I` for Nix's tests either.
2.3.17 became a bit more like 2.4, so a lot of the conditionals can
be dropped.
The documentation for 2.3.17 needs libxslt/libxml2 as well as the
docbook stack to render docs.
Co-Authored-By: Florian Klink <flokli@flokli.de>
Without this, building a newer nix (2.15) on an older nix (2.3) with sandboxing
enabled will fail, which is problematic for doing a self-contained update on an
older system.
gcc lto-wrapper uses the make jobserver to speed up linking, and it
doesn't support the new fifo:/path style of jobserver-auth yet. it'll
still work but use only one thread, so we should stick to the old style
for now.
Previously, 'nix_2_6.perl-bindings' (for example) was built from the Nix 2.6
but linked against 'nix' (the latest version). This usually causes the build
to fail.
aws-sdk-cpp only takes ~1m52s on a 4 core machine under 50% load
which does not justify the requirement on big parallel.
Tested with `nix-build -A nixVersions.nix_2_6.aws-sdk-cpp`.