anchor.diff:  , python
   , fetchurl
   , fetchpatch
  +, fetchFromGitHub
   , lame
   , mplayer
   , libpulseaudio
  
positive.code: # This little flag adds a huge number of dependencies, but we assume that
  # everyone wants Anki to draw plots with statistics by default.
  , plotsSupport ? true
  }:
  
  buildPythonApplication rec {
      version = "2.1.8";
      name = "anki-${version}";
  
      src = fetchurl {
  
negative.code:       chmod 755 $out/bin/anki
  
        cp -v anki.desktop $out/share/applications/
        cp -v README* LICENSE* $doc/share/doc/anki/
        cp -v anki.1 $man/share/man/man1/
        cp -v anki.xml $out/share/mime/packages/
        cp -v anki.{png,xpm} $out/share/pixmaps/
        cp -rv locale $out/share/
        cp -rv anki aqt web $pp/
  
        wrapPythonPrograms
  
        # copy the manual into $doc
        cp -r ${manual}/share/doc/anki/html $doc/share/doc/anki
      '';
  
      passthru = {
        inherit manual;
      };
  
      meta = with stdenv.lib; {
        homepage = "https://apps.ankiweb.net/";
  