summary refs log tree commit diff
diff options
context:
space:
mode:
authorRyan Burns <rtburns@protonmail.com>2022-02-15 22:41:27 -0800
committerRyan Burns <rtburns@protonmail.com>2022-02-15 22:42:05 -0800
commit716e8a2939b7d50ad52a986f56deafafb05e4323 (patch)
tree56b06126926e9edf38eeac7d57f53a9efc8377dd
parent19574af0af3ffaf7c9e359744ed32556f34536bd (diff)
downloadnixpkgs-716e8a2939b7d50ad52a986f56deafafb05e4323.tar
nixpkgs-716e8a2939b7d50ad52a986f56deafafb05e4323.tar.gz
nixpkgs-716e8a2939b7d50ad52a986f56deafafb05e4323.tar.bz2
nixpkgs-716e8a2939b7d50ad52a986f56deafafb05e4323.tar.lz
nixpkgs-716e8a2939b7d50ad52a986f56deafafb05e4323.tar.xz
nixpkgs-716e8a2939b7d50ad52a986f56deafafb05e4323.tar.zst
nixpkgs-716e8a2939b7d50ad52a986f56deafafb05e4323.zip
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
-rw-r--r--pkgs/servers/mpd/default.nix4
-rw-r--r--pkgs/top-level/all-packages.nix1
2 files changed, 4 insertions, 1 deletions
diff --git a/pkgs/servers/mpd/default.nix b/pkgs/servers/mpd/default.nix
index 9eff996f78c..8eb78270377 100644
--- a/pkgs/servers/mpd/default.nix
+++ b/pkgs/servers/mpd/default.nix
@@ -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"
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index ccfe828dbc8..32ef2038b64 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -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;