From 9604fee65a7826e29fa1f06ab897395f11022ab2 Mon Sep 17 00:00:00 2001 From: K900 Date: Wed, 21 Feb 2024 19:10:55 +0300 Subject: [PATCH] mesa: fix build on x86_64-darwin --- pkgs/development/libraries/mesa/default.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/mesa/default.nix b/pkgs/development/libraries/mesa/default.nix index 466b70cb71f7..dff2f0021d46 100644 --- a/pkgs/development/libraries/mesa/default.nix +++ b/pkgs/development/libraries/mesa/default.nix @@ -255,7 +255,13 @@ self = stdenv.mkDerivation { ++ lib.optional haveZink vulkan-loader ++ lib.optional haveDozen directx-headers; - depsBuildBuild = [ pkg-config buildPackages.stdenv.cc ]; + depsBuildBuild = [ pkg-config ] + # Adding this unconditionally makes x86_64-darwin pick up an older toolchain, as + # we explicitly call Mesa with 11.0 stdenv, but buildPackages is still 10.something, + # and Mesa can't build with that. + # FIXME: figure this out, or figure out how to get rid of Mesa on Darwin, + # whichever is easier. + ++ lib.optional (!stdenv.isDarwin) buildPackages.stdenv.cc; nativeBuildInputs = [ meson pkg-config ninja