Change:
nix fails to build libjack2 and libpulseaudio on darwin too (probably another two issues should be filed?). mpd build log is the third one. After disabling libjack2: After disabling libpulseaudio: I'm no expert in c++ but quick googling shows that exceptions are disabled by default when building with xcode toolchain. On a side note, which way is proper to manage ? I'm editing expression in but not sure if that is the right way. I'm using OS X 10.10.4, nix-env 1.9, nixpkgs from master HEAD.
Compilation fails on throw from boost library and mpd sources are compiling with , so I've to mpd expression but still no luck here.
Seems like this didn't get resolved and it's been a while... I have mpd failing to build on Darwin also, but with a different error, CoreAudio related. I'm using a local nixpkgs checked out at , OS X 10.11.3. Here's the failure:

Discussion:
<ins> diff -Naur mpd-0.19.9.orig/configure mpd-0.19.9/configure --- mpd-0.19.9.orig/configure	2015-01-26 19:47:27.000000000 +0000 +++ mpd-0.19.9/configure	2015-01-26 19:47:27.000000000 +0000 @@ -17113,138 +17113,6 @@ done -if test x$no_exceptions = xyes; then - - - - -for flag in -fno-exceptions; do -  as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags__$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 -$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } -if eval ${$as_CACHEVAR+:} false; then : -  $as_echo_n "(cached) " >&6 -else - -  ax_check_save_flags=$CXXFLAGS -  CXXFLAGS="$CXXFLAGS  $flag" -  cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h.  */ - -int -main () -{ - -  ; -  return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : -  eval "$as_CACHEVAR=yes" -else -  eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -  CXXFLAGS=$ax_check_save_flags -fi -eval ac_res=$$as_CACHEVAR -	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : -  if ${CXXFLAGS+:} false; then : -  case " $CXXFLAGS " in -    *" $flag "*) -      { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains $flag"; } >&5 -  (: CXXFLAGS already contains $flag) 2>&5 -  ac_status=$? -  $as_echo "$as_me:${as_lineno-$LINENO}: $? = $ac_status" >&5 -  test $ac_status = 0; } -      ;; -    *) -      { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS="$CXXFLAGS $flag""; } >&5 -  (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 -  ac_status=$? -  $as_echo "$as_me:${as_lineno-$LINENO}: $? = $ac_status" >&5 -  test $ac_status = 0; } -      CXXFLAGS="$CXXFLAGS $flag" -      ;; -   esac -else -  CXXFLAGS="$flag" -fi - -else -  : -fi - -done - - - - - -for flag in -fno-rtti; do -  as_CACHEVAR=`$as_echo "ax_cv_check_cxxflags__$flag" | $as_tr_sh` -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5 -$as_echo_n "checking whether C++ compiler accepts $flag... " >&6; } -if eval ${$as_CACHEVAR+:} false; then : -  $as_echo_n "(cached) " >&6 -else - -  ax_check_save_flags=$CXXFLAGS -  CXXFLAGS="$CXXFLAGS  $flag" -  cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h.  */ - -int -main () -{ - -  ; -  return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : -  eval "$as_CACHEVAR=yes" -else -  eval "$as_CACHEVAR=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -  CXXFLAGS=$ax_check_save_flags -fi -eval ac_res=$$as_CACHEVAR -	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test x"`eval 'as_val=${'$as_CACHEVAR'};$as_echo "$as_val"'`" = xyes; then : -  if ${CXXFLAGS+:} false; then : -  case " $CXXFLAGS " in -    *" $flag "*) -      { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS already contains $flag"; } >&5 -  (: CXXFLAGS already contains $flag) 2>&5 -  ac_status=$? -  $as_echo "$as_me:${as_lineno-$LINENO}: $? = $ac_status" >&5 -  test $ac_status = 0; } -      ;; -    *) -      { { $as_echo "$as_me:${as_lineno-$LINENO}: : CXXFLAGS="$CXXFLAGS $flag""; } >&5 -  (: CXXFLAGS="$CXXFLAGS $flag") 2>&5 -  ac_status=$? -  $as_echo "$as_me:${as_lineno-$LINENO}: $? = $ac_status" >&5 -  test $ac_status = 0; } -      CXXFLAGS="$CXXFLAGS $flag" -      ;; -   esac -else -  CXXFLAGS="$flag" -fi - -else -  : -fi - -done - -fi </ins>

sha256 = "0vzj365s4j0pw5w37lfhx3dmpkdp85driravsvx8rlrw0lii91a7"; }; <ins> patches = stdenv.lib.optionals stdenv.isDarwin ./darwin-enable-cxx-exceptions.patch; </ins> buildInputs = [ pkgconfig glib boost ] ++ opt stdenv.isLinux systemd ++ opt (stdenv.isLinux && alsaSupport) alsaLib

++ opt mpg123Support mpg123 ++ opt aacSupport faad2 ++ opt zipSupport zziplib <del> ++ opt pulseaudioSupport libpulseaudio ++ opt jackSupport libjack2 </del> <ins> ++ opt (!stdenv.isDarwin && pulseaudioSupport) libpulseaudio ++ opt (!stdenv.isDarwin && jackSupport) libjack2 </ins> ++ opt gmeSupport game-music-emu ++ opt icuSupport icu ++ opt clientSupport mpd_clientlib

(mkFlag mmsSupport "mms") (mkFlag mpg123Support "mpg123") (mkFlag aacSupport "aac") <del> (mkFlag pulseaudioSupport "pulse") (mkFlag jackSupport "jack") </del> <ins> (mkFlag (!stdenv.isDarwin && pulseaudioSupport) "pulse") (mkFlag (!stdenv.isDarwin && jackSupport) "jack") </ins> (mkFlag stdenv.isDarwin "osx") (mkFlag icuSupport "icu") (mkFlag gmeSupport "gme")