anchor.diff:    doCheck = !stdenv.isDarwin;
   
     checkPhase = ''
  -    ${lib.optionalString (!enableRedis) "rm -r tests/replication # these tests need the optional dependency 'hiredis'"}
       PYTHONPATH=".:$PYTHONPATH" ${python3.interpreter} -m twisted.trial tests
     '';
   
  
positive.code:     psutil
      psycopg2
      pyasn1
      pymacaroons
      pynacl
      pyopenssl
      pysaml2
      pyyaml
      requests
      signedjson
      sortedcontainers
      treq
      twisted
      unpaddedbase64
      typing-extensions
      authlib
      pyjwt
    ] ++ lib.optional enableSystemd systemd
      ++ lib.optional enableRedis hiredis;
  
  
negative.code: in
  buildPythonApplication rec {
    pname = "matrix-synapse";
    version = "1.35.0";
  
    src = fetchPypi {
      inherit pname version;
      sha256 = "sha256-McgLJoOS8h8C7mcbLaF0hiMkfthpDRUKyB5Effzk2ds=";
    };
  
    patches = [
  