anchor.diff:    crossAttrs = {
       dontSetConfigureCross = true;
       # Some things (vidix) are nanonote specific. Once someone cares, we can make options from them.
  -    preConfigure = preConfigure + ''
  +    preConfigure = ''
         configureFlags="`echo $configureFlags |
           sed -e 's/--codecsdir[^ ]\+//' \
           -e 's/--enable-runtime-cpudetection//' `"
  
positive.code:     #url = http://www.mplayerhq.hu/MPlayer/releases/mplayer-export-snapshot.tar.bz2;
      #sha256 = "cc1b3fda75b172f02c3f46581cfb2c17f4090997fe9314ad046e464a76b858bb";
  
      url = "svn://svn.mplayerhq.hu/mplayer/trunk";
      rev = "${mplayerRev}";
      sha256 = "5688add3256b5de8e0410194232aaaeb01531bb507459ffe4f07e69cb2d81bd7";
    };
  
    prePatch = ''
      sed -i /^_install_strip/d configure
    '';
  
    buildInputs =
      [ freetype zlib pkgconfig ]
      ++ stdenv.lib.optionals x11Support [ libX11 libXext mesa ]
      ++ stdenv.lib.optional alsaSupport alsaLib
      ++ stdenv.lib.optional xvSupport libXv
      ++ stdenv.lib.optional theoraSupport libtheora
      ++ stdenv.lib.optional cacaSupport libcaca
      ++ stdenv.lib.optional xineramaSupport libXinerama
      ++ stdenv.lib.optional randrSupport libXrandr
      ++ stdenv.lib.optionals dvdnavSupport [ libdvdnav libdvdnav.libdvdread ]
      ++ stdenv.lib.optional cddaSupport cdparanoia
      ++ stdenv.lib.optional jackaudioSupport jackaudio
      ++ stdenv.lib.optionals amrSupport [ amrnb amrwb ]
      ++ stdenv.lib.optional x264Support x264
      ++ stdenv.lib.optional xvidSupport xvidcore
      ++ stdenv.lib.optional pulseSupport pulseaudio
      ++ stdenv.lib.optional screenSaverSupport libXScrnSaver
      ++ stdenv.lib.optional lameSupport lame
      ++ stdenv.lib.optional vdpauSupport libvdpau
      ++ stdenv.lib.optional speexSupport speex;
  
    buildNativeInputs = [ yasm ];
  
    preConfigure = ''
      cp -r ${ffmpegGit} ffmpeg
      chmod u+w -R ffmpeg
      sed -ie '1i#include "libavutil/intreadwrite.h"' ffmpeg/libavcodec/libmp3lame.c
    '';
  
    postConfigure = ''
      echo CONFIG_MPEGAUDIODSP=yes >> config.mak
    '';
  
    configureFlags = ''
      ${if cacaSupport then "--enable-caca" else "--disable-caca"}
      ${if dvdnavSupport then "--enable-dvdnav --enable-dvdread --disable-dvdread-internal" else ""}
      ${if x264Support then "--enable-x264 --extra-libs=-lx264" else ""}
      ${if codecs != null then "--codecsdir=${codecs}" else ""}
      ${if (stdenv.isi686 || stdenv.isx86_64) then "--enable-runtime-cpudetection" else ""}
      ${if x11Support then "--enable-x11" else ""}
      ${stdenv.lib.optionalString speexSupport "--enable-speex"}
      --disable-xanim
      --disable-ivtv
      --enable-vidix
      --enable-fbdev
      --disable-ossaudio
    '';
  
    NIX_LDFLAGS = if x11Support then "-lX11 -lXext" else "";
  
    # Provide a reasonable standard font.  Maybe we should symlink here.
    postInstall =
  
negative.code:     };
    } else null;
  
  in
  
  stdenv.mkDerivation rec {
    name = "mplayer-1.1";
  
    src = fetchurl {
      # Old kind of URL:
      # url = http://nixos.org/tarballs/mplayer-snapshot-20101227.tar.bz2;
      # Snapshot I took on 20110423
  