2020-05-27 03:27:48 +02:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, duckdb
|
|
|
|
, numpy
|
|
|
|
, pandas
|
|
|
|
, pybind11
|
|
|
|
, setuptools_scm
|
|
|
|
, pytestrunner
|
2021-02-15 23:53:04 +01:00
|
|
|
, pytestCheckHook
|
2020-05-27 03:27:48 +02:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "duckdb";
|
|
|
|
inherit (duckdb) version src;
|
|
|
|
|
2020-09-04 23:56:43 +02:00
|
|
|
# build attempts to use git to figure out its own version. don't want to add
|
|
|
|
# the dependency for something pointless.
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace scripts/package_build.py --replace \
|
|
|
|
"'git'" "'false'"
|
|
|
|
'';
|
|
|
|
|
2020-05-27 03:27:48 +02:00
|
|
|
postConfigure = ''
|
|
|
|
cd tools/pythonpkg
|
|
|
|
export SETUPTOOLS_SCM_PRETEND_VERSION=${version}
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
pybind11
|
|
|
|
setuptools_scm
|
|
|
|
pytestrunner
|
|
|
|
];
|
|
|
|
|
2021-02-15 23:53:04 +01:00
|
|
|
propagatedBuildInputs = [ numpy pandas ];
|
2020-05-27 03:27:48 +02:00
|
|
|
|
2021-02-15 23:53:04 +01:00
|
|
|
checkInputs = [ pytestCheckHook ];
|
|
|
|
pythonImportsCheck = [ "duckdb" ];
|
2020-05-27 03:27:48 +02:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "DuckDB is an embeddable SQL OLAP Database Management System";
|
|
|
|
homepage = "https://pypi.python.org/pypi/duckdb";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = [ maintainers.costrouc ];
|
|
|
|
};
|
|
|
|
}
|