anchor.diff:      pillow
       derpconf
       python_magic
  -    pexif
       libthumbor
  -    opencv
  +    opencv3
       webcolors
       piexif
       statsd
  +    pkgs.exiftool
  +    pkgs.libjpeg
  +    pkgs.ffmpeg
  +    pkgs.gifsicle
     ] ++ lib.optionals (!isPy3k) [ futures thumborPexif ];
   
  -  # disabled due to too many impure tests and issues with native modules in
  -  # the pure testing environment. See https://github.com/NixOS/nixpkgs/pull/37147
  -  # for further reference.
  -  doCheck = false;
  +  # Remove the source tree before running nosetests because otherwise nosetests
  +  # uses that instead of the installed package. Is there some other way to
  +  # achieve this?
  +  checkPhase = ''
  +    redis-server --port 6668 --requirepass hey_you &
  +    rm -r thumbor
  +    export LC_ALL="en_US.UTF-8"
  +    nosetests -v --with-yanc -s tests/
  +  '';
   
     meta = with lib; {
       description = "A smart imaging service";
  
positive.code: 
    disabled = isPy3k; # see https://github.com/thumbor/thumbor/issues/1004
  
    src = fetchPypi {
      inherit pname version;
      sha256 = "1icfnzwzi5lvnh576n7v3r819jaw15ph9ja2w3fwg5z9qs40xvl8";
    };
  
    postPatch = ''
      substituteInPlace "setup.py" \
        --replace '"argparse",' "" ${lib.optionalString isPy3k ''--replace '"futures",' ""''}
    '';
  
    propagatedBuildInputs = [
      tornado
  
negative.code: { buildPythonPackage, python, tornado, pycrypto, pycurl, pytz
  , pillow, derpconf, python_magic, libthumbor, webcolors
  , piexif, futures, statsd, thumborPexif, fetchFromGitHub, isPy3k, lib
  , mock, raven, nose, yanc, remotecv, pyssim, cairosvg1, preggy, opencv3
  , pkgs, coreutils
  }:
  
  buildPythonPackage rec {
  