···2020 /* If no explicit coreutils is given, use the one from stdenv. */
2121 buildInputs = [ coreutils ];
22222323+ # Disable stack-related gnulib tests on x86_64-darwin because they have problems running under
2424+ # Rosetta 2: test-c-stack hangs, test-sigsegv-catch-stackoverflow fails.
2525+ postPatch = if (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) then ''
2626+ sed -i -E 's:test-c-stack2?\.sh::g' gnulib-tests/Makefile.in
2727+ sed -i -E 's:test-sigsegv-catch-stackoverflow[12]::g' gnulib-tests/Makefile.in
2828+ '' else null;
2929+2330 configureFlags =
2431 # "pr" need not be on the PATH as a run-time dep, so we need to tell
2532 # configure where it is. Covers the cross and native case alike.