about summary refs log tree commit diff
path: root/pkgs/development/python-modules/duckdb/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/duckdb/default.nix')
-rw-r--r--pkgs/development/python-modules/duckdb/default.nix46
1 files changed, 46 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/duckdb/default.nix b/pkgs/development/python-modules/duckdb/default.nix
new file mode 100644
index 000000000000..c839dea3d1a6
--- /dev/null
+++ b/pkgs/development/python-modules/duckdb/default.nix
@@ -0,0 +1,46 @@
+{ lib
+, buildPythonPackage
+, duckdb
+, numpy
+, pandas
+, pybind11
+, setuptools_scm
+, pytestrunner
+, pytest
+}:
+
+buildPythonPackage rec {
+  pname = "duckdb";
+  inherit (duckdb) version src;
+
+  postConfigure = ''
+    cd tools/pythonpkg
+    export SETUPTOOLS_SCM_PRETEND_VERSION=${version}
+  '';
+
+  nativeBuildInputs = [
+    pybind11
+    setuptools_scm
+    pytestrunner
+  ];
+
+  checkInputs = [
+    pytest
+  ];
+
+  propagatedBuildInputs = [
+    numpy
+    pandas
+  ];
+
+  checkPhase = ''
+    pytest
+  '';
+
+  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 ];
+  };
+}