Files
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

96 lines
1.8 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
# build-system
poetry-core,
# dependencies
duckdb,
sqlalchemy,
# testing
fsspec,
hypothesis,
pandas,
pyarrow,
pytest-remotedata,
pytestCheckHook,
pythonAtLeast,
pythonOlder,
snapshottest,
typing-extensions,
}:
buildPythonPackage rec {
pname = "duckdb-engine";
version = "0.17.0";
pyproject = true;
src = fetchFromGitHub {
repo = "duckdb_engine";
owner = "Mause";
tag = "v${version}";
hash = "sha256-AhYCiIhi7jMWKIdDwZZ8MgfDg3F02/jooGLOp6E+E5g=";
};
build-system = [ poetry-core ];
dependencies = [
duckdb
sqlalchemy
];
preCheck = ''
export HOME="$(mktemp -d)"
'';
nativeCheckInputs = [ pytestCheckHook ];
checkInputs = [
fsspec
hypothesis
pandas
pyarrow
pytest-remotedata
typing-extensions
]
++ lib.optionals (pythonOlder "3.12") [
# requires wasmer which is broken for python 3.12
# https://github.com/wasmerio/wasmer-python/issues/778
snapshottest
];
disabledTestPaths = lib.optionals (pythonAtLeast "3.12") [
# requires snapshottest
"duckdb_engine/tests/test_datatypes.py"
];
disabledTestMarks = [
"remote_data"
];
disabledTests = [
# user agent not available in nixpkgs
"test_user_agent"
"test_user_agent_with_custom_user_agent"
# Fail under nixpkgs-review in the sandbox due to "missing tables"
"test_get_columns"
"test_get_foreign_keys"
"test_get_check_constraints"
"test_get_unique_constraints"
];
pythonImportsCheck = [ "duckdb_engine" ];
meta = {
description = "SQLAlchemy driver for duckdb";
homepage = "https://github.com/Mause/duckdb_engine";
changelog = "https://github.com/Mause/duckdb_engine/blob/${src.tag}/CHANGELOG.md";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ cpcloud ];
};
}