1{ lib 2, buildPythonPackage 3, fetchPypi 4, flask 5, flask-login 6, flask-sqlalchemy 7, psycopg2 8, pymysql 9, pytestCheckHook 10, pythonOlder 11, sqlalchemy 12, sqlalchemy-i18n 13, sqlalchemy-utils 14}: 15 16buildPythonPackage rec { 17 pname = "sqlalchemy-continuum"; 18 version = "1.4.0"; 19 format = "setuptools"; 20 21 disabled = pythonOlder "3.7"; 22 23 src = fetchPypi { 24 pname = "SQLAlchemy-Continuum"; 25 inherit version; 26 hash = "sha256-Rk+aWxBjUrXuRPE5MSyzWMWS0l7qrjU3wOrHLC+vteU="; 27 }; 28 29 propagatedBuildInputs = [ 30 sqlalchemy 31 sqlalchemy-utils 32 ]; 33 34 passthru.optional-dependencies = { 35 flask = [ 36 flask 37 ]; 38 flask-login = [ 39 flask-login 40 ]; 41 flask-sqlalchemy = [ 42 flask-sqlalchemy 43 ]; 44 i18n = [ 45 sqlalchemy-i18n 46 ]; 47 }; 48 49 nativeCheckInputs = [ 50 psycopg2 51 pymysql 52 pytestCheckHook 53 ] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies); 54 55 # Indicate tests that we don't have a database server at hand 56 env.DB = "sqlite"; 57 58 pythonImportsCheck = [ 59 "sqlalchemy_continuum" 60 ]; 61 62 meta = with lib; { 63 description = "Versioning and auditing extension for SQLAlchemy"; 64 homepage = "https://github.com/kvesteri/sqlalchemy-continuum/"; 65 changelog = "https://github.com/kvesteri/sqlalchemy-continuum/blob/${version}/CHANGES.rst"; 66 license = licenses.bsd3; 67 maintainers = with maintainers; [ ]; 68 }; 69}