diff options
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/duckdb')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/duckdb/default.nix | 42 | ||||
-rw-r--r-- | nixpkgs/pkgs/development/libraries/duckdb/version.patch | 2 |
2 files changed, 31 insertions, 13 deletions
diff --git a/nixpkgs/pkgs/development/libraries/duckdb/default.nix b/nixpkgs/pkgs/development/libraries/duckdb/default.nix index 801ad7979aee..e6645480d2b2 100644 --- a/nixpkgs/pkgs/development/libraries/duckdb/default.nix +++ b/nixpkgs/pkgs/development/libraries/duckdb/default.nix @@ -1,10 +1,13 @@ { lib , stdenv , fetchFromGitHub +, fetchpatch +, substituteAll , cmake , ninja , openssl , openjdk11 +, python3 , unixODBC , withJdbc ? false , withOdbc ? false @@ -15,22 +18,31 @@ let in stdenv.mkDerivation rec { pname = "duckdb"; - version = "0.9.2"; + version = "0.10.0"; src = fetchFromGitHub { owner = pname; repo = pname; - rev = "v${version}"; - hash = "sha256-QFK8mEMcqQwALFNvAdD8yWixwMYHSbeo6xqx86PvejU="; + rev = "refs/tags/v${version}"; + hash = "sha256-qGUq0iYTaLNHKqbXNLRmvqHMqunvIlP991IKb4qdSt4="; }; - patches = [ ./version.patch ]; - - postPatch = '' - substituteInPlace CMakeLists.txt --subst-var-by DUCKDB_VERSION "v${version}" - ''; + patches = [ + # remove calls to git and set DUCKDB_VERSION to version + (substituteAll { + src = ./version.patch; + version = "v${version}"; + }) + # add missing file needed for httpfs compile + # remove on next update + (fetchpatch { + name = "missing-httpfs-file.patch"; + url = "https://github.com/duckdb/duckdb/commit/3d7aa3ed46ecf5f18122559e385b75f1f5e9aba8.patch"; + hash = "sha256-Q4IHCpMpxn86OquUZdEF7P0nHEPOcWS0TQijTkvBYbQ="; + }) + ]; - nativeBuildInputs = [ cmake ninja ]; + nativeBuildInputs = [ cmake ninja python3 ]; buildInputs = [ openssl ] ++ lib.optionals withJdbc [ openjdk11 ] ++ lib.optionals withOdbc [ unixODBC ]; @@ -54,7 +66,7 @@ stdenv.mkDerivation rec { installCheckPhase = let - excludes = map (pattern: "exclude:'${pattern}'") [ + 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" @@ -91,16 +103,22 @@ stdenv.mkDerivation rec { "[!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" + # can re-enable next update (broken for 0.10.0) + "test/sql/secrets/create_secret_non_writable_persistent_dir.test" + # https://github.com/duckdb/duckdb/issues/10722 + "test/sql/types/nested/list/list_aggregate_dict.test" ] ++ lib.optionals stdenv.isAarch64 [ "test/sql/aggregate/aggregates/test_kurtosis.test" "test/sql/aggregate/aggregates/test_skewness.test" "test/sql/function/list/aggregates/skewness.test" - ]; + ]); in '' runHook preInstallCheck - $PWD/test/unittest ${lib.concatStringsSep " " excludes} + ./test/unittest ${toString excludes} runHook postInstallCheck ''; diff --git a/nixpkgs/pkgs/development/libraries/duckdb/version.patch b/nixpkgs/pkgs/development/libraries/duckdb/version.patch index f40785b43079..122ad4295d41 100644 --- a/nixpkgs/pkgs/development/libraries/duckdb/version.patch +++ b/nixpkgs/pkgs/development/libraries/duckdb/version.patch @@ -52,7 +52,7 @@ index 2b49e11288..0a4a69b9a0 100644 - set(DUCKDB_DEV_ITERATION 0) - set(DUCKDB_VERSION "v${DUCKDB_MAJOR_VERSION}.${DUCKDB_MINOR_VERSION}.${DUCKDB_PATCH_VERSION}-dev${DUCKDB_DEV_ITERATION}") -endif() -+set(DUCKDB_VERSION "@DUCKDB_VERSION@") ++set(DUCKDB_VERSION "@version@") message(STATUS "git hash ${GIT_COMMIT_HASH}, version ${DUCKDB_VERSION}") |