anchor.diff:    inherit (stdenv)
       targetSystem;
     inherit (stdenv.lib)
  +    boolWt
       elem
  -    platforms
  -    wtFlag;
  +    platforms;
   in
   stdenv.mkDerivation rec {
     name = "sox-14.4.2";
  
positive.code:   configureFlags = [
      "--with-distro=Triton"
      #"--with-magic"
      (wtFlag "png" (libpng != null) null)
      (wtFlag "ladspa" (ladspaH != null) null)
      #--with-ladspa-path
      (wtFlag "mad" (libmad != null) null)
      (wtFlag "id3tag" (libid3tag != null) null)
      (wtFlag "lame" (lame != null) null)
      # FIXME: add twolame support
      #(wtFlag "twolame" (twolame != null) null)
      "--without-twolame"
      (wtFlag "opusfile" (opusfile != null) null)
      (wtFlag "opus" (opus != null) null)
      (wtFlag "flac" (flac != null) null)
      (wtFlag "amrwb" (amrwb != null) null)
      (wtFlag "amrnb" (amrnb != null) null)
      (wtFlag "wavpack" (wavpack != null) null)
      #--with-sndio=dyn
      "--without-coreaudio" # Darwin
      (wtFlag "alsa" (alsa-lib != null) null)
      (wtFlag "ao" (libao != null) null)
      (wtFlag "pulseaudio" (pulseaudio_lib != null) null)
      #--with-waveaudio=dyn
      (wtFlag "sndfile" (libsndfile != null) null)
      #--with-oss=dyn
      "--without-oss"
      (wtFlag "sunaudio" (elem targetSystem platforms.illumos) null)
      #--with-mp3=dyn
      (wtFlag "gsm" (gsm != null) null)
      #--with-lpc10=dyn
    ];
  
  
negative.code:     amrwb
      flac
      gsm
      ladspa-sdk
      lame
      libao
      libid3tag
  