anchor.diff: -{ stdenv, lib, fetchFromGitHub, python2 }:
  -
  +{ stdenv, lib, fetchFromGitHub, python3 }:
   let
     mkOverride = attrname: version: sha256:
       self: super: {
  
positive.code:       });
      };
  
    py = python2.override {
      packageOverrides = lib.foldr lib.composeExtensions (self: super: { }) ([
        (mkOverride "flask"       "0.10.1" "0wrkavjdjndknhp8ya8j850jq7a1cli4g5a93mg8nh1xz2gq50sc")
        (mkOverride "flask_login" "0.2.11" "1rg3rsjs1gwi2pw6vr9jmhaqm9b3vc9c4hfcsvp4y8agbh7g3mc3")
        (mkOverride "tornado"     "4.5.3"  "02jzd23l4r6fswmwxaica9ldlyc2p6q8dk6dyff7j58fmdzf853d")
  
        # Octoprint holds back jinja2 to 2.8.1 due to breaking changes.
        # This old version does not have updated test config for pytest 4,
  
negative.code:           };
            doCheck = false;
          });
  
          httpretty = psuper.httpretty.overridePythonAttrs (oldAttrs: rec {
            doCheck = false;
          });
  
          celery = psuper.celery.overridePythonAttrs (oldAttrs: rec {
            doCheck = false;
          });
        })
      ]);
    };
  
    ignoreVersionConstraints = [
      "sentry-sdk"
    ];
  
  in
  py.pkgs.buildPythonApplication rec {
    pname = "OctoPrint";
    version = "1.4.0";
  
    src = fetchFromGitHub {
      owner  = "foosel";
      repo   = "OctoPrint";
      rev    = version;
      sha256 = "1zla1ayr62lkvkr828dh3y287rzj3rv1hpij9kws44ynn4i582ga";
    };
  
    propagatedBuildInputs = with py.pkgs; [
      awesome-slugify flask flask_assets rsa requests pkginfo watchdog
      semantic-version werkzeug flaskbabel tornado
      psutil pyserial flask_login netaddr markdown
      pylru pyyaml sarge feedparser netifaces click websocket_client
      scandir chainmap future wrapt monotonic emoji jinja2
      frozendict cachelib sentry-sdk filetype markupsafe
    ] ++ lib.optionals stdenv.isDarwin [ py.pkgs.appdirs ];
  
    checkInputs = with py.pkgs; [ pytestCheckHook mock ddt ];
  
    postPatch = ''
      sed -r -i \
  