diff options
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/duckdb/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/duckdb/default.nix | 87 |
1 files changed, 52 insertions, 35 deletions
diff --git a/nixpkgs/pkgs/development/libraries/duckdb/default.nix b/nixpkgs/pkgs/development/libraries/duckdb/default.nix index d4d45713de25..d9e9a1b51c2b 100644 --- a/nixpkgs/pkgs/development/libraries/duckdb/default.nix +++ b/nixpkgs/pkgs/development/libraries/duckdb/default.nix @@ -1,13 +1,11 @@ { lib , stdenv , fetchFromGitHub -, fetchpatch , cmake , ninja , openssl , openjdk11 , unixODBC -, withHttpFs ? true , withJdbc ? false , withOdbc ? false }: @@ -17,66 +15,90 @@ let in stdenv.mkDerivation rec { pname = "duckdb"; - version = "0.4.0"; + version = "0.8.0"; src = fetchFromGitHub { owner = pname; repo = pname; rev = "v${version}"; - sha256 = "sha256-pQ/t26dv9ZWLl0MHcAn0sgxryW2T2hM8XyOkXyfC5CY="; + hash = "sha256-w01QB3mufeKdo4d0BBm6xiidnnyo9CLpmntT6690leM="; }; - patches = [ - ./version.patch - (fetchpatch { - name = "fix-tpce-test.patch"; - url = "https://github.com/duckdb/duckdb/commit/82e13a4bb9f0683af6c52468af2fb903cce4286d.patch"; - sha256 = "sha256-m0Bs0DOJQtkadbKZKk88NHyBFJkjxXUsiWYciuRIJLU="; - }) - (fetchpatch { - name = "fix-list-type-metadata.patch"; - url = "https://github.com/duckdb/duckdb/commit/26d123fdc57273903573c72b1ddafc52f365e378.patch"; - sha256 = "sha256-ttqs5EjeSLhZQOXc43Y5/N5IYSESQTD1FZWV1uJ15Fo="; - }) - ]; + patches = [ ./version.patch ]; postPatch = '' substituteInPlace CMakeLists.txt --subst-var-by DUCKDB_VERSION "v${version}" ''; + nativeBuildInputs = [ cmake ninja ]; + buildInputs = [ openssl ] + ++ lib.optionals withJdbc [ openjdk11 ] + ++ lib.optionals withOdbc [ unixODBC ]; + cmakeFlags = [ - "-DBUILD_EXCEL_EXTENSION=ON" - "-DBUILD_FTS_EXTENSION=ON" - "-DBUILD_HTTPFS_EXTENSION=${enableFeature withHttpFs}" + "-DBUILD_AUTOCOMPLETE_EXTENSION=ON" "-DBUILD_ICU_EXTENSION=ON" - "-DBUILD_JSON_EXTENSION=ON" - "-DBUILD_ODBC_DRIVER=${enableFeature withOdbc}" "-DBUILD_PARQUET_EXTENSION=ON" - "-DBUILD_REST=ON" - "-DBUILD_SUBSTRAIT_EXTENSION=ON" - "-DBUILD_TPCDS_EXTENSION=ON" - "-DBUILD_TPCE=ON" "-DBUILD_TPCH_EXTENSION=ON" + "-DBUILD_TPCDS_EXTENSION=ON" + "-DBUILD_FTS_EXTENSION=ON" + "-DBUILD_HTTPFS_EXTENSION=ON" "-DBUILD_VISUALIZER_EXTENSION=ON" + "-DBUILD_JSON_EXTENSION=ON" + "-DBUILD_JEMALLOC_EXTENSION=ON" + "-DBUILD_EXCEL_EXTENSION=ON" + "-DBUILD_INET_EXTENSION=ON" + "-DBUILD_TPCE=ON" + "-DBUILD_ODBC_DRIVER=${enableFeature withOdbc}" "-DJDBC_DRIVER=${enableFeature withJdbc}" + ] ++ lib.optionals doInstallCheck [ + # development settings + "-DBUILD_UNITTESTS=ON" ]; doInstallCheck = true; - preInstallCheck = lib.optionalString stdenv.isDarwin '' + preInstallCheck = '' + export HOME="$(mktemp -d)" + '' + lib.optionalString stdenv.isDarwin '' export DYLD_LIBRARY_PATH="$out/lib''${DYLD_LIBRARY_PATH:+:}''${DYLD_LIBRARY_PATH}" ''; installCheckPhase = let excludes = map (pattern: "exclude:'${pattern}'") [ - "*test_slow" - "Test file buffers for reading/writing to file" - "[test_slow]" + "[s3]" + "Test closing database during long running query" "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/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/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" ] ++ lib.optionals stdenv.isAarch64 [ "test/sql/aggregate/aggregates/test_kurtosis.test" "test/sql/aggregate/aggregates/test_skewness.test" @@ -91,11 +113,6 @@ stdenv.mkDerivation rec { runHook postInstallCheck ''; - nativeBuildInputs = [ cmake ninja ]; - buildInputs = lib.optionals withHttpFs [ openssl ] - ++ lib.optionals withJdbc [ openjdk11 ] - ++ lib.optionals withOdbc [ unixODBC ]; - meta = with lib; { homepage = "https://github.com/duckdb/duckdb"; description = "Embeddable SQL OLAP Database Management System"; |