tiledb: 2.18.2 -> 2.27.2 (#394875)
This commit is contained in:
@@ -1,14 +0,0 @@
|
||||
diff --git a/FindMagic_EP.cmake b/FindMagic_EP.cmake
|
||||
--- a/cmake/Modules/FindMagic_EP.cmake
|
||||
+++ b/cmake/Modules/FindMagic_EP.cmake
|
||||
@@ -126,9 +126,7 @@ if(NOT TILEDB_LIBMAGIC_EP_BUILT)
|
||||
# that was modified by tiledb to also build with cmake for nix
|
||||
ExternalProject_Add(ep_magic
|
||||
PREFIX "externals"
|
||||
- GIT_REPOSITORY "https://github.com/TileDB-Inc/file-windows.git"
|
||||
- GIT_TAG "5.38.2.tiledb"
|
||||
- GIT_SUBMODULES_RECURSE TRUE
|
||||
+ DOWNLOAD_COMMAND true
|
||||
UPDATE_COMMAND ""
|
||||
CMAKE_ARGS
|
||||
-DCMAKE_INSTALL_PREFIX=${TILEDB_EP_INSTALL_PREFIX}
|
||||
@@ -0,0 +1,14 @@
|
||||
--- a/tiledb/sm/misc/generate_embedded_data_header.script.cmake
|
||||
+++ b/tiledb/sm/misc/generate_embedded_data_header.script.cmake
|
||||
@@ -40,11 +40,7 @@
|
||||
string(MAKE_C_IDENTIFIER ${INPUT_FILENAME} INPUT_VARIABLE)
|
||||
|
||||
message(DEBUG "Compressing ${INPUT_FILE} to ${compressed_file}")
|
||||
-file(ARCHIVE_CREATE OUTPUT "${compressed_file}" PATHS ${INPUT_FILE} FORMAT raw COMPRESSION Zstd
|
||||
- # Level 12 was found to have the best balance between compression ratio and speed
|
||||
- # but is available in CMake 3.26+.
|
||||
- COMPRESSION_LEVEL 9
|
||||
-)
|
||||
+execute_process(COMMAND zstd -9 -c "${INPUT_FILE}" OUTPUT_FILE "${compressed_file}")
|
||||
file(SIZE ${compressed_file} COMPRESSED_SIZE)
|
||||
message(DEBUG "Compressed size: ${COMPRESSED_SIZE} bytes")
|
||||
@@ -2,7 +2,6 @@
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
|
||||
cmake,
|
||||
zlib,
|
||||
lz4,
|
||||
@@ -16,70 +15,58 @@
|
||||
clang-tools,
|
||||
catch2_3,
|
||||
python3,
|
||||
gtest,
|
||||
doxygen,
|
||||
fixDarwinDylibNames,
|
||||
gtest,
|
||||
rapidcheck,
|
||||
libpng,
|
||||
file,
|
||||
runCommand,
|
||||
catch2,
|
||||
useAVX2 ? stdenv.hostPlatform.avx2Support,
|
||||
}:
|
||||
|
||||
let
|
||||
# pre-fetch ExternalProject from cmake/Modules/FindMagic_EP.cmake
|
||||
ep-file-windows = fetchFromGitHub {
|
||||
owner = "TileDB-Inc";
|
||||
repo = "file-windows";
|
||||
rev = "5.38.2.tiledb";
|
||||
hash = "sha256-TFn30VCuWZr252VN1T5NNCZe2VEN3xQSomS7XxxKGF8=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
rapidcheck' = runCommand "rapidcheck" { } ''
|
||||
cp -r ${rapidcheck.out} $out
|
||||
chmod -R +w $out
|
||||
cp -r ${rapidcheck.dev}/* $out
|
||||
'';
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "tiledb";
|
||||
version = "2.18.2";
|
||||
version = "2.27.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "TileDB-Inc";
|
||||
repo = "TileDB";
|
||||
rev = version;
|
||||
hash = "sha256-uLiXhigYz3v7NgY38twot3sBHxZS5QCrOiPfME4wWzE=";
|
||||
tag = version;
|
||||
hash = "sha256-zk4jkXJMh6wpuEKaCvuKUDod+F8B/6W5Lw8gwelcPEM=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./FindMagic_EP.cmake.patch
|
||||
];
|
||||
patches = lib.optionals stdenv.hostPlatform.isDarwin [ ./generate_embedded_data_header.patch ];
|
||||
|
||||
postPatch =
|
||||
''
|
||||
# copy pre-fetched external project to directory where it is expected to be
|
||||
mkdir -p build/externals/src
|
||||
cp -a ${ep-file-windows} build/externals/src/ep_magic
|
||||
chmod -R u+w build/externals/src/ep_magic
|
||||
# libcxx (as of llvm-19) does not yet support `stop_token` and `jthread`
|
||||
# without the -fexperimental-library flag. Tiledb adds its own
|
||||
# implementations in the std namespace which conflict with libcxx. This
|
||||
# test can be re-enabled once libcxx supports stop_token and jthread.
|
||||
postPatch = lib.optionalString (stdenv.cc.libcxx != null) ''
|
||||
truncate -s0 tiledb/stdx/test/CMakeLists.txt
|
||||
'';
|
||||
|
||||
# add openssl on path
|
||||
sed -i '49i list(APPEND OPENSSL_PATHS "${openssl.dev}" "${openssl.out}")' \
|
||||
cmake/Modules/FindOpenSSL_EP.cmake
|
||||
''
|
||||
# libcxx (as of llvm-19) does not yet support `stop_token` and `jthread`
|
||||
# without the -fexperimental-library flag. Tiledb adds its own
|
||||
# implementations in the std namespace which conflict with libcxx. This
|
||||
# test can be re-enabled once libcxx supports stop_token and jthread.
|
||||
+ lib.optionalString (stdenv.cc.libcxx != null) ''
|
||||
truncate -s0 tiledb/stdx/test/CMakeLists.txt
|
||||
'';
|
||||
|
||||
# upstream will hopefully fix this in some newer release
|
||||
env.CXXFLAGS = "-include random";
|
||||
env.TILEDB_DISABLE_AUTO_VCPKG = "1";
|
||||
|
||||
# (bundled) blosc headers have a warning on some archs that it will be using
|
||||
# unaccelerated routines.
|
||||
cmakeFlags = [
|
||||
"-DTILEDB_VCPKG=OFF"
|
||||
"-DTILEDB_WEBP=OFF"
|
||||
"-DTILEDB_WERROR=OFF"
|
||||
# https://github.com/NixOS/nixpkgs/issues/144170
|
||||
"-DCMAKE_INSTALL_INCLUDEDIR=include"
|
||||
"-DCMAKE_INSTALL_LIBDIR=lib"
|
||||
] ++ lib.optional (!useAVX2) "-DCOMPILER_SUPPORTS_AVX2=FALSE";
|
||||
|
||||
nativeBuildInputs = [
|
||||
ep-file-windows
|
||||
catch2_3
|
||||
clang-tools
|
||||
cmake
|
||||
@@ -87,10 +74,6 @@ stdenv.mkDerivation rec {
|
||||
doxygen
|
||||
] ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
|
||||
|
||||
nativeCheckInputs = [
|
||||
gtest
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
zlib
|
||||
lz4
|
||||
@@ -101,20 +84,34 @@ stdenv.mkDerivation rec {
|
||||
openssl
|
||||
boost
|
||||
libpqxx
|
||||
libpng
|
||||
file
|
||||
rapidcheck'
|
||||
catch2
|
||||
];
|
||||
|
||||
# fatal error: catch.hpp: No such file or directory
|
||||
doCheck = false;
|
||||
|
||||
nativeCheckInputs = [
|
||||
gtest
|
||||
catch2
|
||||
];
|
||||
|
||||
# test commands taken from
|
||||
# https://github.com/TileDB-Inc/TileDB/blob/dev/.github/workflows/unit-test-runs.yml
|
||||
checkPhase = ''
|
||||
runHook preCheck
|
||||
make -C tiledb tests -j$NIX_BUILD_CORES
|
||||
make -C tiledb test ARGS="-R '^unit_'" -R "test_assert"
|
||||
make -C tiledb test ARGS="-R 'test_ci_asserts'"
|
||||
|
||||
pushd ..
|
||||
cmake --build build --target tests
|
||||
ctest --test-dir build -R '(^unit_|test_assert)' --no-tests=error
|
||||
ctest --test-dir build -R 'test_ci_asserts'
|
||||
popd
|
||||
|
||||
runHook postCheck
|
||||
'';
|
||||
|
||||
doCheck = true;
|
||||
|
||||
installTargets = [
|
||||
"install-tiledb"
|
||||
"doc"
|
||||
@@ -124,11 +121,11 @@ stdenv.mkDerivation rec {
|
||||
install_name_tool -add_rpath ${tbb}/lib $out/lib/libtiledb.dylib
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
description = "TileDB allows you to manage the massive dense and sparse multi-dimensional array data";
|
||||
homepage = "https://github.com/TileDB-Inc/TileDB";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ rakesh4g ];
|
||||
license = lib.licenses.mit;
|
||||
platforms = lib.platforms.unix;
|
||||
maintainers = with lib.maintainers; [ rakesh4g ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -50,6 +50,8 @@ buildPythonPackage rec {
|
||||
disabledTestPaths = [
|
||||
"mapclassify/tests/test_greedy.py"
|
||||
"mapclassify/tests/test_rgba.py"
|
||||
# Abort trap: 6
|
||||
"mapclassify/tests/test_mapclassify.py"
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "mapclassify" ];
|
||||
|
||||
Reference in New Issue
Block a user