From 3108c4dd15f76b0bb38caa9a24e0c41f0a036fc9 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Thu, 14 Nov 2019 22:35:02 +0100 Subject: [PATCH] meson: fix unknown compiler error --- .../tools/build-managers/meson/default.nix | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/pkgs/development/tools/build-managers/meson/default.nix b/pkgs/development/tools/build-managers/meson/default.nix index fad5bc9e630..595d9332739 100644 --- a/pkgs/development/tools/build-managers/meson/default.nix +++ b/pkgs/development/tools/build-managers/meson/default.nix @@ -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