anchor.diff: -{ lib, stdenv, fetchurl, boost, zlib, libevent, openssl, python3, cmake, pkg-config
  -, bison, flex
  +{ lib
  +, stdenv
  +, fetchurl
  +, boost
  +, zlib
  +, libevent
  +, openssl
  +, python3
  +, cmake
  +, pkg-config
  +, bison
  +, flex
   , static ? stdenv.hostPlatform.isStatic
   }:
   
  
positive.code:   disabledTests = [
      "PythonTestSSLSocket"
    ] ++ lib.optionals stdenv.isDarwin [
      # tests that hang up in the darwin sandbox
      "SecurityTest"
      "SecurityFromBufferTest"
      "python_test"
  
      # tests that fail in the darwin sandbox when trying to use network
      "UnitTests"
      "TInterruptTest"
      "TServerIntegrationTest"
  
negative.code:     sha256 = "sha256-9GC1wcow2JGP+V6j62KRs5Uc9RhVNWYIjz8r6JgfYgk=";
    };
  
    # Workaround to make the Python wrapper not drop this package:
    # pythonFull.buildEnv.override { extraLibs = [ thrift ]; }
    pythonPath = [];
  
    nativeBuildInputs = [
      bison
      cmake
      flex
      pkg-config
    ];
  
    buildInputs = [
      boost
      libevent
      openssl
      zlib
    ] ++ lib.optionals (!static) [
      (python3.withPackages (ps: [ps.twisted]))
    ];
  
    postPatch = ''
      # Python 3.10 related failures:
      # SystemError: PY_SSIZE_T_CLEAN macro must be defined for '#' formats
      # AttributeError: module 'collections' has no attribute 'Hashable'
      substituteInPlace test/py/RunClientServer.py \
        --replace "'FastbinaryTest.py'," "" \
        --replace "'TestEof.py'," "" \
        --replace "'TestFrozen.py'," ""
    '';
  
    preConfigure = ''
      export PY_PREFIX=$out
    '';
  
    patches = [
      # ToStringTest.cpp is failing from some reason due to locale issue, this
  