mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-18 03:30:45 +00:00
mesa: fix build on Darwin
This commit is contained in:
parent
e7fb1ff4be
commit
01587e33ae
17
pkgs/development/libraries/mesa/darwin.patch
Normal file
17
pkgs/development/libraries/mesa/darwin.patch
Normal file
|
@ -0,0 +1,17 @@
|
|||
diff --git a/src/glx/glxext.c b/src/glx/glxext.c
|
||||
index 8770863eb7c..537f0af112c 100644
|
||||
--- a/src/glx/glxext.c
|
||||
+++ b/src/glx/glxext.c
|
||||
@@ -886,10 +886,11 @@ __glXInitialize(Display * dpy)
|
||||
Bool zink = False;
|
||||
Bool try_zink = False;
|
||||
|
||||
+ const char *env = getenv("MESA_LOADER_DRIVER_OVERRIDE");
|
||||
+
|
||||
#if defined(GLX_DIRECT_RENDERING) && (!defined(GLX_USE_APPLEGL) || defined(GLX_USE_APPLE))
|
||||
Bool glx_direct = !debug_get_bool_option("LIBGL_ALWAYS_INDIRECT", false);
|
||||
Bool glx_accel = !debug_get_bool_option("LIBGL_ALWAYS_SOFTWARE", false);
|
||||
- const char *env = getenv("MESA_LOADER_DRIVER_OVERRIDE");
|
||||
|
||||
zink = env && !strcmp(env, "zink");
|
||||
try_zink = False;
|
|
@ -179,6 +179,11 @@ self = stdenv.mkDerivation {
|
|||
|
||||
patches = [
|
||||
./opencl.patch
|
||||
] ++ lib.optionals stdenv.isDarwin [
|
||||
# Reorder things to make it build on Darwin again
|
||||
# Submitted upstream: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29592
|
||||
# FIXME: remove when merged or otherwise addressed
|
||||
./darwin.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
|
|
Loading…
Reference in a new issue