anchor.diff: -{ stdenv, fetchFromGitHub, perl, python2Packages, sqlite, gpsbabel
  +{ stdenv, fetchFromGitHub, perl, python, sqlite, gpsbabel
   , withWebKit ? false }:
   
   let
   
     # Pytrainer needs a matplotlib with GTK backend. Also ensure we are
     # using the pygtk with glade support as needed by pytrainer.
  -  matplotlibGtk = python2Packages.matplotlib.override {
  +  matplotlibGtk = python.pkgs.matplotlib.override {
       enableGtk2 = true;
  -    pygtk = python2Packages.pyGtkGlade;
  +    pygtk = python.pkgs.pyGtkGlade;
     };
   
   in
   
  -python2Packages.buildPythonApplication rec {
  -  name = "pytrainer-${version}";
  +python.pkgs.buildPythonApplication rec {
  +  pname = "pytrainer";
     version = "1.11.0";
   
     src = fetchFromGitHub {
  
positive.code:     ./pytrainer-webkit.patch
    ];
  
    propagatedBuildInputs = with python2Packages; [
      dateutil lxml matplotlibGtk pyGtkGlade sqlalchemy_migrate
    ] ++ stdenv.lib.optional withWebKit [ pywebkitgtk ];
  
  
negative.code:   dontPatchELF = true;
    dontStrip = true;
  
    checkPhase = ''
      ${python.interpreter} -m unittest discover
    '';
  
    meta = with stdenv.lib; {
      homepage = https://github.com/pytrainer/pytrainer/wiki;
      description = "Application for logging and graphing sporting excursions";
  