From a8778fc470dd5ad5292cb4fcd4faf425abab3af4 Mon Sep 17 00:00:00 2001 From: Randy Eckenrode Date: Mon, 17 Nov 2025 20:25:22 -0500 Subject: [PATCH] mesa: fix timeout on Darwin --- pkgs/development/libraries/mesa/darwin.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pkgs/development/libraries/mesa/darwin.nix b/pkgs/development/libraries/mesa/darwin.nix index fb64f9e70d60..4487094b5ac0 100644 --- a/pkgs/development/libraries/mesa/darwin.nix +++ b/pkgs/development/libraries/mesa/darwin.nix @@ -59,6 +59,17 @@ stdenv.mkDerivation { ./opencl.patch ]; + postPatch = '' + # Darwin only installs `swrast_dri.so`. It is symlinked to `libdril_dri.dylib`, but the script never terminates + # checking for `swrast_dri.dylib`, which isn’t what will be created. + substituteInPlace bin/install_megadrivers.py \ + --replace-fail " while ext != '.' + args.libname_suffix" " while ext != '.so'" + + # Use `st_mtimespec` on Darwin instead of `st_mtim`. + substituteInPlace src/gallium/drivers/llvmpipe/lp_context.c \ + --replace-fail 'st_mtim.' 'st_mtimespec.' + ''; + outputs = [ "out" "dev"