mpd: fix build on x86_64-darwin

The darwin-specific AssertMacros header has some legacy macros with very
generic names such as "check" which happen to conflict with mpd's
headers. We can explicitly opt out of these macros - at some point in
the future, they will not be defined by default.

Also remove stdenv override, not needed now that x86_64-darwin uses LLVM 11
This commit is contained in:
Ryan Burns 2022-02-15 22:41:27 -08:00
parent 19574af0af
commit 716e8a2939
2 changed files with 4 additions and 1 deletions

View file

@ -157,6 +157,10 @@ let
outputs = [ "out" "doc" ]
++ lib.optional (builtins.elem "documentation" features_) "man";
CXXFLAGS = lib.optionals stdenv.isDarwin [
"-D__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES=0"
];
mesonFlags = [
"-Dtest=true"
"-Dmanpages=true"

View file

@ -21291,7 +21291,6 @@ with pkgs;
mod_timestamp = apacheHttpdPackages.mod_timestamp;
inherit (callPackages ../servers/mpd {
stdenv = if (with stdenv; cc.isClang && isx86_64) then llvmPackages_8.stdenv else stdenv;
inherit (darwin.apple_sdk.frameworks) AudioToolbox AudioUnit;
}) mpd mpd-small mpdWithFeatures;