dae973cb59
GitOrigin-RevId: c90c4025bb6e0c4eaf438128a3b2640314b1c58d
64 lines
1.2 KiB
Nix
64 lines
1.2 KiB
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, pytestCheckHook
|
|
, pythonOlder
|
|
, duckdb
|
|
, hypothesis
|
|
, ipython-sql
|
|
, poetry-core
|
|
, sqlalchemy
|
|
, typing-extensions
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "duckdb-engine";
|
|
version = "0.6.9";
|
|
format = "pyproject";
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchFromGitHub {
|
|
repo = "duckdb_engine";
|
|
owner = "Mause";
|
|
rev = "refs/tags/v${version}";
|
|
hash = "sha256-F1Y7NXkNnCbCxc43gBN7bt+z0D0EwnzCyBKFzbq9KcA=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
poetry-core
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
duckdb
|
|
sqlalchemy
|
|
];
|
|
|
|
preCheck = ''
|
|
export HOME="$(mktemp -d)"
|
|
'';
|
|
|
|
# this test tries to download the httpfs extension
|
|
disabledTests = [
|
|
"test_preload_extension"
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
pytestCheckHook
|
|
hypothesis
|
|
ipython-sql
|
|
typing-extensions
|
|
];
|
|
|
|
pythonImportsCheck = [
|
|
"duckdb_engine"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "SQLAlchemy driver for duckdb";
|
|
homepage = "https://github.com/Mause/duckdb_engine";
|
|
changelog = "https://github.com/Mause/duckdb_engine/blob/v${version}/CHANGELOG.md";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ cpcloud ];
|
|
};
|
|
}
|