anchor.diff:        ;
   
       buildInputs = [ pkgconfig lame yasm zlib bzip2 SDL ]
  +      ++ [ perl ] # for install-man target
         ++ optional mp3Support lame
         ++ optional speexSupport speex
         ++ optional theoraSupport libtheora
  
positive.code: 
      outputs = [ "out" "tools" ];
  
      # move avplay to get rid of the SDL dependency in the main output
      postInstall = ''
        mkdir -p "$tools/bin"
        mv "$out/bin/avplay" "$tools/bin"
      '';
  
      doInstallCheck = false; # fails randomly
  
negative.code: { stdenv, fetchurl, pkgconfig, yasm, bzip2, zlib, perl
  , mp3Support    ? true,   lame      ? null
  , speexSupport  ? true,   speex     ? null
  , theoraSupport ? true,   libtheora ? null
  