summary refs log tree commit diff
path: root/pkgs/development/libraries/mesa
diff options
context:
space:
mode:
authorAtemu <atemu.main@gmail.com>2020-12-13 07:41:02 +0100
committerAtemu <atemu.main@gmail.com>2020-12-13 08:08:02 +0100
commit01698009aca69ff39185c67581ea87dba8d73a30 (patch)
treec211f9c65e71c8736c2e908fdc758b17008c02ec /pkgs/development/libraries/mesa
parente9158eca70ae59e73fae23be5d13d3fa0cfc78b4 (diff)
downloadnixpkgs-01698009aca69ff39185c67581ea87dba8d73a30.tar
nixpkgs-01698009aca69ff39185c67581ea87dba8d73a30.tar.gz
nixpkgs-01698009aca69ff39185c67581ea87dba8d73a30.tar.bz2
nixpkgs-01698009aca69ff39185c67581ea87dba8d73a30.tar.lz
nixpkgs-01698009aca69ff39185c67581ea87dba8d73a30.tar.xz
nixpkgs-01698009aca69ff39185c67581ea87dba8d73a30.tar.zst
nixpkgs-01698009aca69ff39185c67581ea87dba8d73a30.zip
mesa: find prefixed nm when cross compiling
Diffstat (limited to 'pkgs/development/libraries/mesa')
-rw-r--r--pkgs/development/libraries/mesa/default.nix4
1 files changed, 4 insertions, 0 deletions
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";