summary refs log tree commit diff
diff options
context:
space:
mode:
authorRob <86313040+robert-manchester@users.noreply.github.com>2023-10-10 00:45:34 -0700
committerRob <86313040+robert-manchester@users.noreply.github.com>2023-10-16 15:49:54 -0700
commitba63d2f8da23b6e847361c7221d328e992e6b587 (patch)
treee334ba3e9fcd426060374c12d313691495377e5a
parent72457c9fc55af797f2bafe9ea82f749bc8a24750 (diff)
downloadnixpkgs-ba63d2f8da23b6e847361c7221d328e992e6b587.tar
nixpkgs-ba63d2f8da23b6e847361c7221d328e992e6b587.tar.gz
nixpkgs-ba63d2f8da23b6e847361c7221d328e992e6b587.tar.bz2
nixpkgs-ba63d2f8da23b6e847361c7221d328e992e6b587.tar.lz
nixpkgs-ba63d2f8da23b6e847361c7221d328e992e6b587.tar.xz
nixpkgs-ba63d2f8da23b6e847361c7221d328e992e6b587.tar.zst
nixpkgs-ba63d2f8da23b6e847361c7221d328e992e6b587.zip
duckdb: 0.9.0 -> 0.9.1
changelog https://github.com/duckdb/duckdb/releases/tag/v0.9.1
-rw-r--r--pkgs/development/libraries/duckdb/default.nix10
-rw-r--r--pkgs/development/libraries/duckdb/version.patch22
-rw-r--r--pkgs/development/python-modules/duckdb/default.nix14
-rw-r--r--pkgs/development/python-modules/duckdb/setup.patch30
4 files changed, 44 insertions, 32 deletions
diff --git a/pkgs/development/libraries/duckdb/default.nix b/pkgs/development/libraries/duckdb/default.nix
index ea152c0cc09..c9f6711780b 100644
--- a/pkgs/development/libraries/duckdb/default.nix
+++ b/pkgs/development/libraries/duckdb/default.nix
@@ -15,13 +15,13 @@ let
 in
 stdenv.mkDerivation rec {
   pname = "duckdb";
-  version = "0.9.0";
+  version = "0.9.1";
 
   src = fetchFromGitHub {
     owner = pname;
     repo = pname;
     rev = "v${version}";
-    hash = "sha256-EKvDH7RwOC4Gu/lturrfnGpzXnJ9azIwAFeuVoa6L/Y=";
+    hash = "sha256-UG/vV/6WxVLq9mdze8pSDFJIekOgGsg93dzMq6eP6Dg=";
   };
 
   patches = [ ./version.patch ];
@@ -106,10 +106,12 @@ stdenv.mkDerivation rec {
     '';
 
   meta = with lib; {
-    homepage = "https://github.com/duckdb/duckdb";
+    changelog = "https://github.com/duckdb/duckdb/releases/tag/v${version}";
     description = "Embeddable SQL OLAP Database Management System";
+    homepage = "https://duckdb.org/";
     license = licenses.mit;
-    platforms = platforms.all;
+    mainProgram = "duckdb";
     maintainers = with maintainers; [ costrouc cpcloud ];
+    platforms = platforms.all;
   };
 }
diff --git a/pkgs/development/libraries/duckdb/version.patch b/pkgs/development/libraries/duckdb/version.patch
index 9b368eac5db..f40785b4307 100644
--- a/pkgs/development/libraries/duckdb/version.patch
+++ b/pkgs/development/libraries/duckdb/version.patch
@@ -56,25 +56,3 @@ index 2b49e11288..0a4a69b9a0 100644
  
  message(STATUS "git hash ${GIT_COMMIT_HASH}, version ${DUCKDB_VERSION}")
  
-diff --git a/tools/pythonpkg/setup.py b/tools/pythonpkg/setup.py
-index fdf2911019..c363cc518a 100644
---- a/tools/pythonpkg/setup.py
-+++ b/tools/pythonpkg/setup.py
-@@ -163,8 +163,6 @@ if 'BUILD_HTTPFS' in os.environ:
- for ext in extensions:
-     toolchain_args.extend(['-DDUCKDB_EXTENSION_{}_LINKED'.format(ext.upper())])
- 
--toolchain_args.extend(['-DDUCKDB_EXTENSION_AUTOLOAD_DEFAULT=1', '-DDUCKDB_EXTENSION_AUTOINSTALL_DEFAULT=1'])
--
- 
- class get_pybind_include(object):
-     def __init__(self, user=False):
-@@ -343,7 +341,7 @@ setup(
-     packages=packages,
-     include_package_data=True,
-     python_requires='>=3.7.0',
--    setup_requires=setup_requires + ["setuptools_scm<7.0.0", 'pybind11>=2.6.0'],
-+    setup_requires=setup_requires + ["setuptools_scm", 'pybind11>=2.6.0'],
-     use_scm_version=setuptools_scm_conf,
-     tests_require=['google-cloud-storage', 'mypy', 'pytest'],
-     classifiers=[
diff --git a/pkgs/development/python-modules/duckdb/default.nix b/pkgs/development/python-modules/duckdb/default.nix
index e9aac74d835..37ddad2cd04 100644
--- a/pkgs/development/python-modules/duckdb/default.nix
+++ b/pkgs/development/python-modules/duckdb/default.nix
@@ -13,17 +13,19 @@
 }:
 
 buildPythonPackage rec {
-  inherit (duckdb) pname version src patches;
+  inherit (duckdb) pname version src;
   format = "setuptools";
 
-  postPatch = ''
+  # 1. let nix control build cores
+  # 2. default to extension autoload & autoinstall disabled
+  # 3. unconstrain setuptools_scm version
+  patches = (duckdb.patches or []) ++ [ ./setup.patch ];
+
+  postPatch = (duckdb.postPatch or "") + ''
     # we can't use sourceRoot otherwise patches don't apply, because the patches apply to the C++ library
     cd tools/pythonpkg
 
-    # 1. let nix control build cores
-    # 2. unconstrain setuptools_scm version
-    substituteInPlace setup.py \
-      --replace "multiprocessing.cpu_count()" "$NIX_BUILD_CORES"
+    substituteInPlace setup.py --subst-var NIX_BUILD_CORES
 
     # avoid dependency on mypy
     rm tests/stubs/test_stubs.py
diff --git a/pkgs/development/python-modules/duckdb/setup.patch b/pkgs/development/python-modules/duckdb/setup.patch
new file mode 100644
index 00000000000..8c8f790a66a
--- /dev/null
+++ b/pkgs/development/python-modules/duckdb/setup.patch
@@ -0,0 +1,30 @@
+diff --git a/tools/pythonpkg/setup.py b/tools/pythonpkg/setup.py
+index 30f1e1ccdd..6784169fcb 100644
+--- a/tools/pythonpkg/setup.py
++++ b/tools/pythonpkg/setup.py
+@@ -96,7 +96,7 @@ def parallel_cpp_compile(
+             return
+         self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
+ 
+-    list(multiprocessing.pool.ThreadPool(multiprocessing.cpu_count()).imap(_single_compile, objects))
++    list(multiprocessing.pool.ThreadPool(@NIX_BUILD_CORES@).imap(_single_compile, objects))
+     return objects
+ 
+ 
+@@ -163,7 +163,6 @@ if 'BUILD_HTTPFS' in os.environ:
+ for ext in extensions:
+     toolchain_args.extend(['-DDUCKDB_EXTENSION_{}_LINKED'.format(ext.upper())])
+ 
+-toolchain_args.extend(['-DDUCKDB_EXTENSION_AUTOLOAD_DEFAULT=1', '-DDUCKDB_EXTENSION_AUTOINSTALL_DEFAULT=1'])
+ 
+ 
+ class get_pybind_include(object):
+@@ -348,7 +347,7 @@ setup(
+     packages=packages,
+     include_package_data=True,
+     python_requires='>=3.7.0',
+-    setup_requires=setup_requires + ["setuptools_scm<7.0.0", 'pybind11>=2.6.0'],
++    setup_requires=setup_requires + ["setuptools_scm", 'pybind11>=2.6.0'],
+     use_scm_version=setuptools_scm_conf,
+     tests_require=['google-cloud-storage', 'mypy', 'pytest'],
+     classifiers=[