mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-08-31 20:54:56 +00:00
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