anchor.diff:        substituteInPlace src/_c_internal_utils.c \
           --replace libX11.so.6 ${libX11}/lib/libX11.so.6 \
           --replace libwayland-client.so.0 ${wayland}/lib/libwayland-client.so.0
  +    '' + ''
  +      # avoid matplotlib trying to download dependencies
  +      echo "[libs]
  +      system_freetype=true
  +      system_qhull=true" > mplsetup.cfg
  +      cat mplsetup.cfg
  +      echo FFFFFFFFFFFFFFFFFFFFFFFFFFFFF
       '';
   
     # Matplotlib needs to be built against a specific version of freetype in
  
positive.code: { lib, stdenv, fetchPypi, writeText, buildPythonPackage, isPy3k, pycairo
  , which, cycler, python-dateutil, numpy, pyparsing, sphinx, tornado, kiwisolver
  , freetype, qhull, libpng, pkg-config, mock, pytz, pygobject3, gobject-introspection
  , certifi, pillow
  , enableGhostscript ? true, ghostscript, gtk3
  , enableGtk3 ? false, cairo
  # darwin has its own "MacOSX" backend
  
negative.code: 
    XDG_RUNTIME_DIR = "/tmp";
  
    nativeBuildInputs = [
      pkg-config
      setuptools-scm
      setuptools-scm-git-archive
    ];
  
    buildInputs = [ which sphinx ]
      ++ lib.optional enableGhostscript ghostscript
      ++ lib.optional stdenv.isDarwin [ Cocoa ];
  
    propagatedBuildInputs =
      [ cycler fonttools python-dateutil numpy pyparsing tornado freetype qhull
        kiwisolver certifi libpng mock pytz pillow ]
      ++ lib.optionals enableGtk3 [ cairo pycairo gtk3 gobject-introspection pygobject3 ]
      ++ lib.optionals enableTk [ tcl tk tkinter libX11 ]
  