Merge pull request #323770 from K900/next-darwin-fixes

[staging-next] Fix Mesa and xvfb on Darwin
This commit is contained in:
K900 2024-07-01 16:28:37 +03:00 committed by GitHub
commit a5b56cabe0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 4 additions and 25 deletions

View File

@ -18,13 +18,6 @@ let
in stdenv.mkDerivation {
inherit (common) pname version src meta;
patches = [
# 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
];
outputs = [ "out" "dev" ];
nativeBuildInputs = [
@ -33,6 +26,7 @@ in stdenv.mkDerivation {
meson
ninja
pkg-config
python3Packages.packaging
python3Packages.python
python3Packages.mako
];

View File

@ -1,17 +0,0 @@
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;

View File

@ -923,6 +923,8 @@ self: super:
"--with-xkb-bin-directory=${xorg.xkbcomp}/bin"
"--with-xkb-path=${xorg.xkeyboardconfig}/share/X11/xkb"
"--with-xkb-output=$out/share/X11/xkb/compiled"
] ++ lib.optional stdenv.isDarwin [
"--without-dtrace"
];
buildInputs = old.buildInputs ++ (with xorg; [
@ -930,7 +932,7 @@ self: super:
libXfont2
xtrans
libxcvt
]);
]) ++ lib.optional stdenv.isDarwin [ Xplugin ];
});
lndir = super.lndir.overrideAttrs (attrs: {