duckdb: 0.5.1 -> 0.6.0

This commit is contained in:
Phillip Cloud 2022-11-14 15:58:01 -05:00
parent 7e673586ba
commit a29510ba1a
No known key found for this signature in database
GPG key ID: D908212070FD785E
3 changed files with 52 additions and 29 deletions

View file

@ -17,15 +17,17 @@ let
in
stdenv.mkDerivation rec {
pname = "duckdb";
version = "0.5.1";
version = "0.6.0";
src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = "v${version}";
sha256 = "sha256-qzDQFS2ogQ6hqTCddHnttWF365007Labnn4BmHB219k=";
sha256 = "sha256-XCEX2VCynbMUP5xsxWq8PlHnfrBfES5c2fuu2jhM+tI=";
};
patches = [ ./version.patch ];
postPatch = ''
substituteInPlace CMakeLists.txt --subst-var-by DUCKDB_VERSION "v${version}"
'';
@ -42,6 +44,7 @@ stdenv.mkDerivation rec {
"-DBUILD_TPCE=ON"
"-DBUILD_TPCH_EXTENSION=ON"
"-DBUILD_VISUALIZER_EXTENSION=ON"
"-DBUILD_INET_EXTENSION=ON"
"-DJDBC_DRIVER=${enableFeature withJdbc}"
];
@ -56,13 +59,20 @@ stdenv.mkDerivation rec {
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"
# 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"

View file

@ -1,27 +1,34 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 92c097228..5f51929f6 100644
index 349af6acf7..7ffec0b4cb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -157,45 +157,7 @@ if(${CMAKE_SYSTEM_NAME} STREQUAL "SunOS")
@@ -196,52 +196,7 @@ if(${CMAKE_SYSTEM_NAME} STREQUAL "SunOS")
set(SUN TRUE)
endif()
-execute_process(
- COMMAND git log -1 --format=%h
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
- RESULT_VARIABLE GIT_RESULT
- OUTPUT_VARIABLE GIT_COMMIT_HASH
- OUTPUT_STRIP_TRAILING_WHITESPACE)
-execute_process(
- COMMAND git describe --tags --abbrev=0
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
- OUTPUT_VARIABLE GIT_LAST_TAG
- OUTPUT_STRIP_TRAILING_WHITESPACE)
-execute_process(
- COMMAND git describe --tags --long
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
- OUTPUT_VARIABLE GIT_ITERATION
- OUTPUT_STRIP_TRAILING_WHITESPACE)
-find_package(Git)
-if(Git_FOUND)
- if (NOT DEFINED GIT_COMMIT_HASH)
- execute_process(
- COMMAND ${GIT_EXECUTABLE} log -1 --format=%h
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
- RESULT_VARIABLE GIT_RESULT
- OUTPUT_VARIABLE GIT_COMMIT_HASH
- OUTPUT_STRIP_TRAILING_WHITESPACE)
- endif()
- execute_process(
- COMMAND ${GIT_EXECUTABLE} describe --tags --abbrev=0
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
- OUTPUT_VARIABLE GIT_LAST_TAG
- OUTPUT_STRIP_TRAILING_WHITESPACE)
- execute_process(
- COMMAND ${GIT_EXECUTABLE} describe --tags --long
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
- OUTPUT_VARIABLE GIT_ITERATION
- OUTPUT_STRIP_TRAILING_WHITESPACE)
-else()
- message("Git NOT FOUND")
-endif()
-
-if(GIT_RESULT EQUAL "0")
- string(REGEX REPLACE "v([0-9]+).[0-9]+.[0-9]+" "\\1" DUCKDB_MAJOR_VERSION "${GIT_LAST_TAG}")
@ -47,5 +54,5 @@ index 92c097228..5f51929f6 100644
-endif()
+set(DUCKDB_VERSION "@DUCKDB_VERSION@")
option(AMALGAMATION_BUILD
"Build from the amalgamation files, rather than from the normal sources."
message(STATUS "git hash ${GIT_COMMIT_HASH}, version ${DUCKDB_VERSION}")

View file

@ -13,13 +13,19 @@
}:
buildPythonPackage rec {
pname = "duckdb";
inherit (duckdb) version src patches;
inherit (duckdb) pname version src patches;
format = "setuptools";
preConfigure = ''
# we can't use sourceRoot otherwise patches don't apply, because the patches
# apply to the C++ library
postPatch = ''
cd tools/pythonpkg
substituteInPlace setup.py --replace "multiprocessing.cpu_count()" "$NIX_BUILD_CORES"
# 1. let nix control build cores
# 2. unconstrain setuptools_scm version
substituteInPlace setup.py \
--replace "multiprocessing.cpu_count()" "$NIX_BUILD_CORES" \
--replace "setuptools_scm<7.0.0" "setuptools_scm"
'';
SETUPTOOLS_SCM_PRETEND_VERSION = version;