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