From 01698009aca69ff39185c67581ea87dba8d73a30 Mon Sep 17 00:00:00 2001 From: Atemu Date: Sun, 13 Dec 2020 07:41:02 +0100 Subject: [PATCH] mesa: find prefixed nm when cross compiling --- pkgs/development/libraries/mesa/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/libraries/mesa/default.nix b/pkgs/development/libraries/mesa/default.nix index 891e11dbadf..08c50f654c9 100644 --- a/pkgs/development/libraries/mesa/default.nix +++ b/pkgs/development/libraries/mesa/default.nix @@ -101,6 +101,10 @@ stdenv.mkDerivation { 'DATADIR "/drirc.d"' '"${placeholder "out"}/drirc.d"' substituteInPlace src/util/meson.build --replace \ "get_option('datadir')" "'${placeholder "out"}'" + '' + lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) '' + substituteInPlace meson.build --replace \ + "find_program('nm')" \ + "find_program('${stdenv.cc.targetPrefix}nm')" ''; outputs = [ "out" "dev" "drivers" ] ++ lib.optional enableOSMesa "osmesa";