anchor.diff:      '';
   
       postInstall = ''
  +      mkdir -p "$out/lib/${python.libPrefix}/site-packages"
  +      ln -s $out/share/anki/* $out/lib/${python.libPrefix}/site-packages/
  +      export PYTHONPATH="$out/lib/${python.libPrefix}/site-packages:$PYTHONPATH"
         wrapPythonPrograms
       '';
   
  
positive.code: { stdenv, lib, fetchurl
  , python, pyqt4, pythonPackages
  # This little flag adds a huge number of dependencies, but we assume that
  # everyone wants Anki to draw plots with statistics by default.
  
negative.code: in
  
  stdenv.mkDerivation rec {
      name = "anki-2.0.12";
      src = fetchurl {
        url = "http://ankisrs.net/download/mirror/${name}.tgz";
        sha256 = "1pccws3rgfpyxdx5xph5x72c4a46is0alfz73icn9ppgjdizzipr";
      };
  
      pythonPath = [ pyqt4 py.pysqlite py.sqlalchemy py.pyaudio ]
                ++ lib.optional plotsSupport py.matplotlib;
  
      buildInputs = [ python py.wrapPython lame mplayer pulseaudio ];
  
      preConfigure = ''
        substituteInPlace anki \
  