From 6c159d50340a3fa28cb28dacdce2b225ddba40e6 Mon Sep 17 00:00:00 2001 From: Tristan Ross Date: Fri, 26 Jul 2024 00:54:15 -0700 Subject: [PATCH] mesa: fix building with llvm Use glslang's bin output in nativeBuildInputs to prevent propagating the "dev" output which then injects the glslang libraries for host into target. Switch to using the spirv-tools package for buildInputs instead of glslang to further prevent the wrong things from propagating on host since we only need the pkg-config and static libraries. --- pkgs/development/libraries/mesa/default.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/mesa/default.nix b/pkgs/development/libraries/mesa/default.nix index 5782ec9fbedf..b1d5b0ad84f9 100644 --- a/pkgs/development/libraries/mesa/default.nix +++ b/pkgs/development/libraries/mesa/default.nix @@ -10,6 +10,7 @@ , file , flex , glslang +, spirv-tools , intltool , jdupes , libdrm @@ -226,7 +227,7 @@ in stdenv.mkDerivation { directx-headers elfutils expat - glslang + spirv-tools libglvnd libomxil-bellagio libunwind @@ -275,7 +276,9 @@ in stdenv.mkDerivation { python3Packages.mako python3Packages.ply jdupes - glslang + # Use bin output from glslang to not propagate the dev output at + # the build time with the host glslang. + (lib.getBin glslang) rustc rust-bindgen rust-cbindgen