From e4d62a5ad5b86ed600d3303b18d0a0bb6fb840ab Mon Sep 17 00:00:00 2001 From: toonn Date: Sun, 4 Jul 2021 21:58:11 +0200 Subject: [PATCH] mariadb: Avoid building with clang-11 libcxx-11.1.0 uses `#include ` in several places. There's a `storage/mroonga/version` file in the mariadb source and this gets picked up by libcxx when building mroonga but that file doesn't contain valid source code. To avoid the issue altogether we're sticking with a clang-7 stdenv to build mariadb for now. Based on 787f934b247e41f7bb6d04959a66e0a111a0f0db from LnL7's WIP LLVM 9 update. Co-authored-by: Daiderd Jordan --- pkgs/top-level/all-packages.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index daf37f8b6f03..5098e93f690b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -21188,6 +21188,10 @@ with pkgs; }; mariadb = callPackage ../servers/sql/mariadb { + # libcxx-11.1.0 includes `` in some places and this picks up + # storage/mroonga/version under clang-11 so we build mariadb with a clang-7 + # stdenv instead. + stdenv = if stdenv.cc.isClang then llvmPackages_7.stdenv else stdenv; inherit (darwin) cctools; inherit (darwin.apple_sdk.frameworks) CoreServices; };