97bf56b78d ("lix: link with -z,noexecstack") sets NIX_LDFLAGS to
"-z,noexecstack" on every platform. cc-wrapper prefixes each word of
NIX_LDFLAGS with -Wl, so clang hands `-z noexecstack` to the linker, and
Apple's ld64 has no -z option. Meson's compiler sanity check then fails
to link, and every Lix in lixPackageSets fails to build on
aarch64-darwin: https://hydra.nixos.org/build/347153371
Mach-O does not need the flag: ld64 leaves stacks non-executable unless
-allow_stack_execute is passed. lib.optionalString keeps the value
unchanged on ELF platforms, so no Linux derivation changes.
Assisted-by: Claude Code (Claude Opus 5.5)
This gets us `--print-errorlogs` and `--timeout-multiplier=0` for free.
Port of upstream [0] and [1].
[0]: e6da29ad6b
[1]: 52872026fb
Co-authored-by: Emily <hello@emily.moe>
Ports over 828ffb210af7a8d82081217d41b06cbf151a6ed9 and
774a7e1e78e4911ad5d2c9917b568e172d43a6f6 from the nix tree.
It's a bit verbose, but no way around that with modular packaging. This
does mean that -c libraries now get both libraries - static archives
and shared libraries, but -c bindings are pretty small (~100KiB) each so
this is not expected to be an issue.
Co-authored-by: Riccardo Mazzarini <me@noib3.dev>
Ports d07852b5f33b4ef2bd19d7f542575502898f9f97 from the nix tree.
This reduces the closure of pkgsStatic.nix down to several packages.
The closure size drops down from 430.7 MiB -> 39.4 Mib.
Ideally of course we would have the nix-cli component not be allowed to
reference any store paths at all, since that's the whole point of static
builds (i.e to be self-contained).
Co-authored-by: Tristan Ross <tristan.ross@midstall.com>
Preloading libnixstore with DYLD_INSERT_LIBRARIES makes the Rosetta probe
recurse when arch resolves to GNU coreutils. This hangs Cachix while GHC
loads its dependencies for Template Haskell, before the test phase.
Backport NixOS/nix#16067 to detect Rosetta through its runtime file instead
of spawning arch. Adjust the include context for Nix 2.31 and apply the
patch only on Darwin, keeping Linux derivations unchanged.
Built Cachix on aarch64-darwin: 116 examples, 0 failures. Nix's functional
suite passed 169 tests with 32 skips. GNU arch also runs successfully with
the patched libraries preloaded.
Fixes https://github.com/NixOS/nixpkgs/issues/562481
Assisted-by: Codex (GPT-6)
Extract version, source, and Cargo definitions consistently for 2.94,
2.95, and the development snapshot. Keep scope construction, patches,
and aliases in default.nix.
Isolate the 2.95 updater in its release file so replacing a shared Cargo
hash cannot modify the development snapshot. Restrict automated updates
to the 2.95 release series.
Assisted-by: Codex (gpt-5.6-sol)
Assisted-by: Codex (GPT-6)