1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 pytestCheckHook, 6 pythonOlder, 7 duckdb, 8 hypothesis, 9 ipython-sql, 10 pandas, 11 poetry-core, 12 pytest-remotedata, 13 snapshottest, 14 sqlalchemy, 15 typing-extensions, 16}: 17 18buildPythonPackage rec { 19 pname = "duckdb-engine"; 20 version = "0.12.0"; 21 pyproject = true; 22 23 disabled = pythonOlder "3.8"; 24 25 src = fetchFromGitHub { 26 repo = "duckdb_engine"; 27 owner = "Mause"; 28 rev = "refs/tags/v${version}"; 29 hash = "sha256-cm0vbz0VZ2Ws6FDWJO16q4KZW2obs0CBNrfY9jmR+6A="; 30 }; 31 32 nativeBuildInputs = [ poetry-core ]; 33 34 propagatedBuildInputs = [ 35 duckdb 36 sqlalchemy 37 ]; 38 39 preCheck = '' 40 export HOME="$(mktemp -d)" 41 ''; 42 43 disabledTests = [ 44 # test should be skipped based on sqlalchemy version but isn't and fails 45 "test_commit" 46 ]; 47 48 nativeCheckInputs = [ pytestCheckHook ]; 49 50 checkInputs = [ 51 hypothesis 52 ipython-sql 53 pandas 54 pytest-remotedata 55 snapshottest 56 typing-extensions 57 ]; 58 59 pytestFlagsArray = [ 60 "-m" 61 "'not remote_data'" 62 ]; 63 64 pythonImportsCheck = [ "duckdb_engine" ]; 65 66 meta = with lib; { 67 description = "SQLAlchemy driver for duckdb"; 68 homepage = "https://github.com/Mause/duckdb_engine"; 69 changelog = "https://github.com/Mause/duckdb_engine/blob/v${version}/CHANGELOG.md"; 70 license = licenses.mit; 71 maintainers = with maintainers; [ cpcloud ]; 72 }; 73}