meson: fix unknown compiler error (#73423)

meson: fix unknown compiler error
This commit is contained in:
Jan Tojnar 2019-11-14 23:24:54 +01:00 committed by GitHub
commit 2024d55020
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,4 +1,11 @@
{ lib, python3Packages, stdenv, writeTextDir, substituteAll, targetPackages }:
{ lib
, python3Packages
, fetchpatch
, stdenv
, writeTextDir
, substituteAll
, targetPackages
}:
let
# See https://mesonbuild.com/Reference-tables.html#cpu-families
@ -54,6 +61,14 @@ python3Packages.buildPythonApplication rec {
src = ./fix-rpath.patch;
inherit (builtins) storeDir;
})
# Fix detecting incorrect compiler in the store path hash.
# https://github.com/NixOS/nixpkgs/issues/73417#issuecomment-554077964
# https://github.com/mesonbuild/meson/pull/6185
(fetchpatch {
url = "https://github.com/mesonbuild/meson/commit/972ede1d14fdf17fe5bb8fb99be220f9395c2392.patch";
sha256 = "19bfsylhpy0b2xv3ks8ac9x3q6vvvyj1wjcy971v9d5f1455xhbb";
})
] ++ lib.optionals stdenv.isDarwin [
# We use custom Clang, which makes Meson think *not Apple*, while still
# relying on system linker. When it detects standard Clang, Meson will