anchor.diff:        (mkFlag aacSupport "aac")
         (mkFlag pulseaudioSupport "pulse")
         (mkFlag stdenv.isDarwin "osx")
  +      (mkFlag icuSupport "icu")
         "--enable-debug"
       ]
       ++ opt stdenv.isLinux
  
positive.code:     ++ opt mpg123Support mpg123
      ++ opt aacSupport faad2
      ++ opt zipSupport zziplib
      ++ opt pulseaudioSupport pulseaudio;
  
    configureFlags =
      [ (mkFlag (!stdenv.isDarwin && alsaSupport) "alsa")
  
negative.code: , mpg123Support ? true, mpg123
  , aacSupport ? true, faad2
  , pulseaudioSupport ? true, pulseaudio
  , icuSupport ? true, icu
  }:
  
  let
    opt = stdenv.lib.optional;
    mkFlag = c: f: if c then "--enable-${f}" else "--disable-${f}";
    major = "0.19";
    minor = "1";
  
  in stdenv.mkDerivation rec {
    name = "mpd-${major}.${minor}";
    src = fetchurl {
      url    = "http://www.musicpd.org/download/mpd/${major}/${name}.tar.gz";
      sha256 = "08a8wgr1kp86nnf9xbc71l9py1plslp10xw0ah344imkwyfg0nj8";
    };
  
    buildInputs = [ pkgconfig glib boost ]
      ++ opt stdenv.isLinux systemd
      ++ opt (stdenv.isLinux && alsaSupport) alsaLib
      ++ opt flacSupport flac
  