2022-04-27 09:35:20 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, duckdb
|
|
|
|
, hypothesis
|
|
|
|
, ipython-sql
|
2024-05-15 15:35:15 +00:00
|
|
|
, pandas
|
2022-04-27 09:35:20 +00:00
|
|
|
, poetry-core
|
2024-05-15 15:35:15 +00:00
|
|
|
, pytest-remotedata
|
2023-07-15 17:15:38 +00:00
|
|
|
, snapshottest
|
2022-04-27 09:35:20 +00:00
|
|
|
, sqlalchemy
|
2022-08-12 12:06:08 +00:00
|
|
|
, typing-extensions
|
2022-04-27 09:35:20 +00:00
|
|
|
}:
|
2022-08-12 12:06:08 +00:00
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "duckdb-engine";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "0.12.0";
|
2024-02-29 20:09:43 +00:00
|
|
|
pyproject = true;
|
2022-04-27 09:35:20 +00:00
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2022-04-27 09:35:20 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
repo = "duckdb_engine";
|
|
|
|
owner = "Mause";
|
2022-12-02 08:20:57 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-cm0vbz0VZ2Ws6FDWJO16q4KZW2obs0CBNrfY9jmR+6A=";
|
2022-04-27 09:35:20 +00:00
|
|
|
};
|
|
|
|
|
2022-08-21 13:32:41 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
2022-04-27 09:35:20 +00:00
|
|
|
|
2022-08-21 13:32:41 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
duckdb
|
|
|
|
sqlalchemy
|
|
|
|
];
|
2022-04-27 09:35:20 +00:00
|
|
|
|
2022-09-22 12:36:57 +00:00
|
|
|
preCheck = ''
|
|
|
|
export HOME="$(mktemp -d)"
|
|
|
|
'';
|
|
|
|
|
|
|
|
disabledTests = [
|
2023-07-15 17:15:38 +00:00
|
|
|
# test should be skipped based on sqlalchemy version but isn't and fails
|
|
|
|
"test_commit"
|
2022-09-22 12:36:57 +00:00
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-08-21 13:32:41 +00:00
|
|
|
pytestCheckHook
|
2024-05-15 15:35:15 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
2022-08-21 13:32:41 +00:00
|
|
|
hypothesis
|
|
|
|
ipython-sql
|
2024-05-15 15:35:15 +00:00
|
|
|
pandas
|
|
|
|
pytest-remotedata
|
2023-07-15 17:15:38 +00:00
|
|
|
snapshottest
|
2022-08-21 13:32:41 +00:00
|
|
|
typing-extensions
|
|
|
|
];
|
2022-04-27 09:35:20 +00:00
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
pytestFlagsArray = [
|
|
|
|
"-m" "'not remote_data'"
|
|
|
|
];
|
|
|
|
|
2022-08-21 13:32:41 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"duckdb_engine"
|
|
|
|
];
|
2022-04-27 09:35:20 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2022-08-21 13:32:41 +00:00
|
|
|
description = "SQLAlchemy driver for duckdb";
|
2022-04-27 09:35:20 +00:00
|
|
|
homepage = "https://github.com/Mause/duckdb_engine";
|
2022-12-28 21:21:41 +00:00
|
|
|
changelog = "https://github.com/Mause/duckdb_engine/blob/v${version}/CHANGELOG.md";
|
2022-04-27 09:35:20 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ cpcloud ];
|
|
|
|
};
|
|
|
|
}
|