anchor.diff:        ++ optional freetypeSupport "--enable-libfreetype"
         ;
   
  -  nativeBuildInputs = [ pkgconfig ];
  -    buildInputs = [ lame yasm zlib bzip2 SDL ]
  +  nativeBuildInputs = [ pkgconfig perl ];
  +    buildInputs = [ lame yasm zlib bzip2 SDL bash ]
         ++ [ perl ] # for install-man target
         ++ optional mp3Support lame
         ++ optional speexSupport speex
  
positive.code: { stdenv, fetchurl, pkgconfig, yasm, bzip2, zlib, perl
  , mp3Support    ? true,   lame      ? null
  , speexSupport  ? true,   speex     ? null
  , theoraSupport ? true,   libtheora ? null
  
negative.code:       ++ optional (vpxSupport && hasPrefix "0.8." version) ./vpxenc-0.8.17-libvpx-1.5.patch
        ;
  
      postPatch = ''
        patchShebangs .
        # another shebang was hidden in a here document text
        substituteInPlace ./configure --replace "#! /bin/sh" "#!${bash}/bin/sh"
      '';
  
      configureFlags =
        assert stdenv.lib.all (x: x!=null) buildInputs;
  