anchor.diff:      [ cmake ]
       ++ stdenv.lib.optional withQt4 qt4
       ++ stdenv.lib.optionals withQt5 [ qtbase qtsvg qttools ]
  -    ++ stdenv.lib.optional withKDE4 kde4.kdelibs
       ++ stdenv.lib.optionals withTaglib [ taglib taglib_extras ]
       ++ stdenv.lib.optionals withReplaygain [ ffmpeg speex mpg123 ]
       ++ stdenv.lib.optional withCdda cdparanoia
  
positive.code:     ++ stdenv.lib.optional withLame lame
      ++ stdenv.lib.optional withMtp libmtp
      ++ stdenv.lib.optional withMusicbrainz libmusicbrainz5
      ++ stdenv.lib.optional (withTaglib && !withKDE4 && withDevices) udisks2;
  
    nativeBuildInputs = stdenv.lib.optional withQt5 makeQtWrapper;
  
    unpackPhase = "tar -xvf $src";
    sourceRoot = "${name}";
  
    # Qt4 is implicit when KDE is switched off.
    cmakeFlags = stdenv.lib.flatten [
      (fstats withKDE4 [ "KDE" "KWALLET" ])
      (fstat withQt5 "QT5")
      (fstats withTaglib [ "TAGLIB" "TAGLIB_EXTRAS" ])
      (fstats withReplaygain [ "FFMPEG" "MPG123" "SPEEXDSP" ])
  
negative.code: }:
  
  # One and only one front-end.
  assert withQt5 -> withQt4 == false;
  assert withQt4 -> withQt5 == false;
  assert withQt4 || withQt5;
  
  # Inter-dependencies.
  assert withCddb -> withCdda && withTaglib;
  