2022-04-27 09:35:20 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, duckdb
|
|
|
|
, hypothesis
|
|
|
|
, ipython-sql
|
|
|
|
, poetry-core
|
|
|
|
, 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";
|
2022-09-22 12:36:57 +00:00
|
|
|
version = "0.6.4";
|
2022-04-27 09:35:20 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
repo = "duckdb_engine";
|
|
|
|
owner = "Mause";
|
2022-09-22 12:36:57 +00:00
|
|
|
rev = "v${version}";
|
|
|
|
hash = "sha256-7PfrI4bNz0XtBa/cb8T43j06BJ3B2S5zIyBZsEusyXc=";
|
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)"
|
|
|
|
'';
|
|
|
|
|
|
|
|
# this test tries to download the httpfs extension
|
|
|
|
disabledTests = [
|
|
|
|
"test_preload_extension"
|
|
|
|
];
|
|
|
|
|
2022-08-21 13:32:41 +00:00
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
hypothesis
|
|
|
|
ipython-sql
|
|
|
|
typing-extensions
|
|
|
|
];
|
2022-04-27 09:35:20 +00:00
|
|
|
|
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";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ cpcloud ];
|
|
|
|
};
|
|
|
|
}
|