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-12-28 21:21:41 +00:00
|
|
|
version = "0.6.6";
|
2022-04-27 09:35:20 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
repo = "duckdb_engine";
|
|
|
|
owner = "Mause";
|
2022-12-02 08:20:57 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2022-12-28 21:21:41 +00:00
|
|
|
hash = "sha256-OpVkMkZt5h4Rp615wx42cR/NFbv6dwsklqM8/xRswtw=";
|
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";
|
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 ];
|
|
|
|
};
|
|
|
|
}
|