anchor.diff:    propagatedBuildInputs = [
       setuptools
       # setup.py
  +    asgiref
       blinker
       brotli
       certifi
  
positive.code: , parver
  , pytest-asyncio
  , hypothesis
  }:
  
  buildPythonPackage rec {
    pname = "mitmproxy";
    version = "5.2";
    disabled = isPy27;
  
    src = fetchFromGitHub {
      owner  = pname;
      repo   = pname;
      rev    = "v${version}";
      sha256 = "0ja0aqnfmkvns5qmd51hmrvbw8dnccaks30gxgzgcjgy30rj4brq";
    };
  
    patches = [
      # Apply patch from upstream to make mitmproxy v5.2 compatible with urwid >v2.1.0
      (fetchpatch {
        name = "urwid-lt-2.1.0.patch";
        url = "https://github.com/mitmproxy/mitmproxy/commit/ea9177217208fdf642ffc54f6b1f6507a199350c.patch";
        sha256 = "1z5r8izg5nvay01ywl3xc6in1vjfi9f144j057p3k5rzfliv49gg";
      })
    ];
  
    postPatch = ''
      # remove dependency constraints
      sed 's/>=\([0-9]\.\?\)\+\( \?, \?<\([0-9]\.\?\)\+\)\?//' -i setup.py
    '';
  
    doCheck = (!stdenv.isDarwin);
  
negative.code:     hyperframe
      kaitaistruct
      ldap3
      msgpack
      passlib
      protobuf
      publicsuffix2
  