From 12f245a3f7ffd89fa6bdba0c6a5f3e72a9054886 Mon Sep 17 00:00:00 2001 From: Tim Quelch Date: Tue, 27 Oct 2026 12:37:31 +1100 Subject: [PATCH] duckdb: 1.5.5 -> 2.0.0 - Update cmake config to account for upstream changes in versioning and extension build behaviour in 2.0 - Move extension and excluded test pattern config to top level attribute to allow easier overriding in overlays. For example this makes adding additional extensions to build and link easier - Add additional unit test that requires network stack to exclusions for install check --- pkgs/by-name/du/duckdb/package.nix | 196 +++++++++++++++------------ pkgs/by-name/du/duckdb/versions.json | 8 +- 2 files changed, 110 insertions(+), 94 deletions(-) diff --git a/pkgs/by-name/du/duckdb/package.nix b/pkgs/by-name/du/duckdb/package.nix index 6958e97117f36..7bddf3ce325b3 100644 --- a/pkgs/by-name/du/duckdb/package.nix +++ b/pkgs/by-name/du/duckdb/package.nix @@ -60,9 +60,22 @@ stdenv.mkDerivation (finalAttrs: { ]; buildInputs = [ openssl ]; + duckdbExtensions = [ + "autocomplete" + "core_functions" + "icu" + "json" + "parquet" + "tpcds" + "tpch" + ]; + cmakeFlags = [ - (lib.cmakeFeature "DUCKDB_EXTENSION_CONFIGS" "${finalAttrs.src}/.github/config/in_tree_extensions.cmake") + (lib.cmakeFeature "DUCKDB_EXPLICIT_VERSION" "v${finalAttrs.version}") + (lib.cmakeFeature "GIT_COMMIT_HASH" finalAttrs.rev) (lib.cmakeFeature "OVERRIDE_GIT_DESCRIBE" "v${finalAttrs.version}-0-g${finalAttrs.rev}") + (lib.cmakeFeature "BUILD_EXTENSIONS" (lib.strings.join ";" finalAttrs.duckdbExtensions)) + (lib.cmakeBool "LINK_CORE_EXTENSIONS" true) # ensures extensions are linked as well as built # development settings (lib.cmakeBool "BUILD_UNITTESTS" finalAttrs.finalPackage.doInstallCheck) ] @@ -78,97 +91,100 @@ stdenv.mkDerivation (finalAttrs: { nativeInstallCheckInputs = [ versionCheckHook ]; + excludedTestPatterns = ( + [ + "[s3]" + "Test closing database during long running query" + "Test using a remote optimizer pass in case thats important to someone" + "test/common/test_cast_hugeint.test" + "test/sql/copy/csv/test_csv_remote.test" + "test/sql/copy/parquet/test_parquet_remote.test" + "test/sql/copy/parquet/test_parquet_remote_foreign_files.test" + "test/sql/storage/compression/chimp/chimp_read.test" + "test/sql/storage/compression/chimp/chimp_read_float.test" + "test/sql/storage/compression/patas/patas_compression_ratio.test_coverage" + "test/sql/storage/compression/patas/patas_read.test" + "test/sql/json/read_json_objects.test" + "test/sql/json/read_json.test" + "test/sql/json/table/read_json_objects.test" + "test/sql/json/table/read_json.test" + "test/sql/copy/parquet/parquet_5968.test" + "test/fuzzer/pedro/buffer_manager_out_of_memory.test" + "test/sql/storage/compression/bitpacking/bitpacking_size_calculation.test" + "test/sql/copy/parquet/delta_byte_array_length_mismatch.test" + "test/sql/function/timestamp/test_icu_strptime.test" + "test/sql/timezone/test_icu_timezone.test" + "test/sql/copy/parquet/snowflake_lineitem.test" + "test/sql/copy/parquet/test_parquet_force_download.test" + "test/sql/copy/parquet/delta_byte_array_multiple_pages.test" + "test/sql/copy/csv/test_csv_httpfs_prepared.test" + "test/sql/copy/csv/test_csv_httpfs.test" + "test/sql/settings/test_disabled_file_system_httpfs.test" + "test/sql/copy/csv/parallel/test_parallel_csv.test" + "test/sql/copy/csv/parallel/csv_parallel_httpfs.test" + "test/common/test_cast_struct.test" + # test is order sensitive + "test/sql/copy/parquet/parquet_glob.test" + # these are only hidden if no filters are passed in + "[!hide]" + # this test apparently never terminates + "test/sql/copy/csv/auto/test_csv_auto.test" + # test expects installed file timestamp to be > 2024 + "test/sql/table_function/read_text_and_blob.test" + # fails with Out of Memory Error + "test/sql/copy/parquet/batched_write/batch_memory_usage.test" + # wants http connection + "test/sql/copy/csv/recursive_query_csv.test" + "test/sql/copy/csv/test_mixed_lines.test" + "test/parquet/parquet_long_string_stats.test" + "test/sql/attach/attach_remote.test" + "test/sql/copy/csv/test_sniff_httpfs.test" + "test/sql/httpfs/internal_issue_2490.test" + # fails with incorrect result + # Upstream issue https://github.com/duckdb/duckdb/issues/14294 + "test/sql/copy/file_size_bytes.test" + # https://github.com/duckdb/duckdb/issues/17757#issuecomment-3032080432 + "test/issues/general/test_17757.test" + "test/sql/logging/http_response_log_redaction.test" # requires network + ] + ++ lib.optionals stdenv.hostPlatform.isAarch64 [ + "test/sql/aggregate/aggregates/test_kurtosis.test" + "test/sql/aggregate/aggregates/test_skewness.test" + "test/sql/function/list/aggregates/skewness.test" + "test/sql/aggregate/aggregates/histogram_table_function.test" + ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ + # UB in PhysicalRangeJoin (shared by IEJoin and PiecewiseMergeJoin) causes + # Apple Clang at -O3 to emit brk trap instructions on aarch64-darwin. + # Affects any test routing through PhysicalIEJoin (2+ inequality conditions, + # cardinality >= merge_join_threshold) or forcing IEJoin via debug_asof_iejoin. + "test/sql/join/iejoin/iejoin_issue_6314.test_slow" + "test/sql/join/iejoin/iejoin_issue_6861.test" + "test/sql/join/iejoin/iejoin_issue_7278.test" + "test/sql/join/iejoin/iejoin_projection_maps.test" + "test/sql/join/iejoin/merge_join_switch.test" + "test/sql/join/iejoin/predicate_expressions.test" + "test/sql/join/iejoin/test_countzeros.test" + "test/sql/join/iejoin/test_ieantijoin.test" + "test/sql/join/iejoin/test_iejoin.test" + "test/sql/join/iejoin/test_iejoin_east_west.test" + "test/sql/join/iejoin/test_iejoin_events.test" + "test/sql/join/iejoin/test_iejoin_null_keys.test" + "test/sql/join/iejoin/test_iejoin_overlaps.test" + "test/sql/join/iejoin/test_iejoin_predicate.test" + "test/sql/join/iejoin/test_iejoin_sort_tasks.test_slow" + "test/sql/join/iejoin/test_iesemijoin.test" + # asof tests that loop debug_asof_iejoin=True, forcing the IEJoin path + "test/sql/join/asof/test_asof_join_inequalities.test" + "test/sql/join/asof/test_asof_join_missing.test_slow" + # 10240-row inequality join routing to IEJoin via plan_comparison_join.cpp + "test/sql/join/test_complex_range_join.test" + ] + ); + installCheckPhase = let - excludes = map (pattern: "exclude:'${pattern}'") ( - [ - "[s3]" - "Test closing database during long running query" - "Test using a remote optimizer pass in case thats important to someone" - "test/common/test_cast_hugeint.test" - "test/sql/copy/csv/test_csv_remote.test" - "test/sql/copy/parquet/test_parquet_remote.test" - "test/sql/copy/parquet/test_parquet_remote_foreign_files.test" - "test/sql/storage/compression/chimp/chimp_read.test" - "test/sql/storage/compression/chimp/chimp_read_float.test" - "test/sql/storage/compression/patas/patas_compression_ratio.test_coverage" - "test/sql/storage/compression/patas/patas_read.test" - "test/sql/json/read_json_objects.test" - "test/sql/json/read_json.test" - "test/sql/json/table/read_json_objects.test" - "test/sql/json/table/read_json.test" - "test/sql/copy/parquet/parquet_5968.test" - "test/fuzzer/pedro/buffer_manager_out_of_memory.test" - "test/sql/storage/compression/bitpacking/bitpacking_size_calculation.test" - "test/sql/copy/parquet/delta_byte_array_length_mismatch.test" - "test/sql/function/timestamp/test_icu_strptime.test" - "test/sql/timezone/test_icu_timezone.test" - "test/sql/copy/parquet/snowflake_lineitem.test" - "test/sql/copy/parquet/test_parquet_force_download.test" - "test/sql/copy/parquet/delta_byte_array_multiple_pages.test" - "test/sql/copy/csv/test_csv_httpfs_prepared.test" - "test/sql/copy/csv/test_csv_httpfs.test" - "test/sql/settings/test_disabled_file_system_httpfs.test" - "test/sql/copy/csv/parallel/test_parallel_csv.test" - "test/sql/copy/csv/parallel/csv_parallel_httpfs.test" - "test/common/test_cast_struct.test" - # test is order sensitive - "test/sql/copy/parquet/parquet_glob.test" - # these are only hidden if no filters are passed in - "[!hide]" - # this test apparently never terminates - "test/sql/copy/csv/auto/test_csv_auto.test" - # test expects installed file timestamp to be > 2024 - "test/sql/table_function/read_text_and_blob.test" - # fails with Out of Memory Error - "test/sql/copy/parquet/batched_write/batch_memory_usage.test" - # wants http connection - "test/sql/copy/csv/recursive_query_csv.test" - "test/sql/copy/csv/test_mixed_lines.test" - "test/parquet/parquet_long_string_stats.test" - "test/sql/attach/attach_remote.test" - "test/sql/copy/csv/test_sniff_httpfs.test" - "test/sql/httpfs/internal_issue_2490.test" - # fails with incorrect result - # Upstream issue https://github.com/duckdb/duckdb/issues/14294 - "test/sql/copy/file_size_bytes.test" - # https://github.com/duckdb/duckdb/issues/17757#issuecomment-3032080432 - "test/issues/general/test_17757.test" - ] - ++ lib.optionals stdenv.hostPlatform.isAarch64 [ - "test/sql/aggregate/aggregates/test_kurtosis.test" - "test/sql/aggregate/aggregates/test_skewness.test" - "test/sql/function/list/aggregates/skewness.test" - "test/sql/aggregate/aggregates/histogram_table_function.test" - ] - ++ lib.optionals stdenv.hostPlatform.isDarwin [ - # UB in PhysicalRangeJoin (shared by IEJoin and PiecewiseMergeJoin) causes - # Apple Clang at -O3 to emit brk trap instructions on aarch64-darwin. - # Affects any test routing through PhysicalIEJoin (2+ inequality conditions, - # cardinality >= merge_join_threshold) or forcing IEJoin via debug_asof_iejoin. - "test/sql/join/iejoin/iejoin_issue_6314.test_slow" - "test/sql/join/iejoin/iejoin_issue_6861.test" - "test/sql/join/iejoin/iejoin_issue_7278.test" - "test/sql/join/iejoin/iejoin_projection_maps.test" - "test/sql/join/iejoin/merge_join_switch.test" - "test/sql/join/iejoin/predicate_expressions.test" - "test/sql/join/iejoin/test_countzeros.test" - "test/sql/join/iejoin/test_ieantijoin.test" - "test/sql/join/iejoin/test_iejoin.test" - "test/sql/join/iejoin/test_iejoin_east_west.test" - "test/sql/join/iejoin/test_iejoin_events.test" - "test/sql/join/iejoin/test_iejoin_null_keys.test" - "test/sql/join/iejoin/test_iejoin_overlaps.test" - "test/sql/join/iejoin/test_iejoin_predicate.test" - "test/sql/join/iejoin/test_iejoin_sort_tasks.test_slow" - "test/sql/join/iejoin/test_iesemijoin.test" - # asof tests that loop debug_asof_iejoin=True, forcing the IEJoin path - "test/sql/join/asof/test_asof_join_inequalities.test" - "test/sql/join/asof/test_asof_join_missing.test_slow" - # 10240-row inequality join routing to IEJoin via plan_comparison_join.cpp - "test/sql/join/test_complex_range_join.test" - ] - ); + excludes = map (pattern: "exclude:'${pattern}'") finalAttrs.excludedTestPatterns; LD_LIBRARY_PATH = lib.optionalString stdenv.hostPlatform.isDarwin "DY" + "LD_LIBRARY_PATH"; in # FIXME: do something about the excessive logging on x86_64-linux (> 250 MiB). diff --git a/pkgs/by-name/du/duckdb/versions.json b/pkgs/by-name/du/duckdb/versions.json index 09a078b659072..9c978e1328d44 100644 --- a/pkgs/by-name/du/duckdb/versions.json +++ b/pkgs/by-name/du/duckdb/versions.json @@ -1,6 +1,6 @@ { - "version": "1.5.5", - "rev": "d8cdaa33fda8df955cc76ef58a280f68f4cd43fa", - "hash": "sha256-vFXrMcWF5KDYYRjWZb6iJdhGnCAb6SMlSgzlcr+FQ8Y=", - "python_hash": "sha256-O4tYdPz6H2By7WXT9GzfyBGNeJruCkzSmTYIbiEq2dQ=" + "version": "2.0.0", + "rev": "d54cbbe3df17e8e5ce68312f483b4155836112aa", + "hash": "sha256-1fhgPD/QGT/fK+BabX2dbTWOsajS6feNl5+9iw8rvwU=", + "python_hash": "sha256-2KKAzfAm7f4sOr0fP1eizjO5A9m12ZItqFX7Jb0qyyU=" }