Files
Andrew Plaza 6809a773a3 atf: fix cross build on Darwin
Three issues prevented correct cross-compilation of atf on Darwin:

1. ATF_SHELL was not set, so configure's AC_PATH_PROGS found the
   build-platform bash in PATH. On Darwin, atf uses
   darwin.bootstrapStdenv whose initialPath includes the native bash;
   set ATF_SHELL to darwin.bootstrapStdenv.shell to pin it explicitly.
   Using the shell string from bootstrapStdenv avoids introducing a
   new derivation argument, which would force evaluation of
   pkgsStatic.bashNonInteractive and recreate the infinite recursion
   that the existing darwin.bootstrapStdenv override prevents.

2. configure's AC_RUN_IFELSE checks (kyua_cv_getopt_plus,
   kyua_cv_attribute_noreturn, kyua_cv_getcwd_works) try to execute
   compiled test programs on the build host, which fails when cross-
   compiling. Pre-set these cache variables so configure skips the
   run tests.

3. atf-sh and atf-check shebangs referenced the build-platform bash.
   Add patchShebangs --host to postInstall to rewrite them to the
   host-platform bash.

Fixes #413910
2026-04-15 21:07:46 -04:00
..
2026-04-15 21:07:46 -04:00