mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-25 07:05:13 +00:00
46 lines
964 B
Nix
46 lines
964 B
Nix
{ lib
|
|
, buildPythonPackage
|
|
, duckdb
|
|
, numpy
|
|
, pandas
|
|
, pybind11
|
|
, setuptools_scm
|
|
, pytestrunner
|
|
, pytestCheckHook
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "duckdb";
|
|
inherit (duckdb) version src;
|
|
|
|
# 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'"
|
|
'';
|
|
|
|
postConfigure = ''
|
|
cd tools/pythonpkg
|
|
export SETUPTOOLS_SCM_PRETEND_VERSION=${version}
|
|
'';
|
|
|
|
nativeBuildInputs = [
|
|
pybind11
|
|
setuptools_scm
|
|
pytestrunner
|
|
];
|
|
|
|
propagatedBuildInputs = [ numpy pandas ];
|
|
|
|
checkInputs = [ pytestCheckHook ];
|
|
pythonImportsCheck = [ "duckdb" ];
|
|
|
|
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 ];
|
|
};
|
|
}
|