anchor.diff:      python-sql
       werkzeug
       wrapt
  -    pillow
       passlib
   
       # extra dependencies
  -    bcrypt
       pydot
       python-Levenshtein
  -    simplejson
       html2text
  -  ] ++ lib.optional withPostgresql psycopg2;
  +    weasyprint
  +    gevent
  +    pillow
  +  ] ++ relatorio.extras-require.fodt
  +    ++ passlib.extras-require.bcrypt
  +    ++ passlib.extras-require.argon2
  +    ++ lib.optional withPostgresql psycopg2;
   
  -  # If unset, trytond will try to mkdir /homeless-shelter
  -  preCheck = ''
  +  checkPhase = ''
  +    runHook preCheck
  +
       export HOME=$(mktemp -d)
  +    export TRYTOND_DATABASE_URI="sqlite://"
  +    export DB_NAME=":memory:";
  +    ${python.interpreter} -m unittest discover -s trytond.tests
  +
  +    runHook postCheck
     '';
   
     meta = with lib; {
  
positive.code:       modularity, scalability and security.
      '';
      homepage = "http://www.tryton.org/";
      license = licenses.gpl3Plus;
      maintainers = with maintainers; [ udono johbo ];
    };
  
negative.code: , werkzeug
  , wrapt
  , passlib
  , pydot
  , python-Levenshtein
  , html2text
  , weasyprint
  , gevent
  , pillow
  , withPostgresql ? true, psycopg2
  , python
  }:
  
  buildPythonPackage rec {
    pname = "trytond";
    version = "6.4.0";
    format = "setuptools";
  
    disabled = pythonOlder "3.7";
  
    src = fetchPypi {
      inherit pname version;
      sha256 = "3c04d75c2a779b88b8c7ab6dd252cf4fc51f9546bf42760d10dbd1a17f61b288";
    };
  
    propagatedBuildInputs = [
      defusedxml
      lxml
      relatorio
      genshi
  