22 lib ,
33 stdenv ,
44 fetchFromGitHub ,
5-
65 cmake ,
76 zlib ,
87 lz4 ,
1615 clang-tools ,
1716 catch2_3 ,
1817 python3 ,
19- gtest ,
2018 doxygen ,
2119 fixDarwinDylibNames ,
20+ gtest ,
21+ rapidcheck ,
22+ libpng ,
23+ file ,
24+ runCommand ,
25+ catch2 ,
2226 useAVX2 ? stdenv . hostPlatform . avx2Support ,
2327} :
2428
2529let
26- # pre-fetch ExternalProject from cmake/Modules/FindMagic_EP.cmake
27- ep-file-windows = fetchFromGitHub {
28- owner = "TileDB-Inc" ;
29- repo = "file-windows" ;
30- rev = "5.38.2.tiledb" ;
31- hash = "sha256-TFn30VCuWZr252VN1T5NNCZe2VEN3xQSomS7XxxKGF8=" ;
32- fetchSubmodules = true ;
33- } ;
34-
30+ rapidcheck' = runCommand "rapidcheck" { } ''
31+ cp -r ${ rapidcheck . out } $out
32+ chmod -R +w $out
33+ cp -r ${ rapidcheck . dev } /* $out
34+ '' ;
3535in
3636stdenv . mkDerivation rec {
3737 pname = "tiledb" ;
38- version = "2.18 .2" ;
38+ version = "2.27 .2" ;
3939
4040 src = fetchFromGitHub {
4141 owner = "TileDB-Inc" ;
4242 repo = "TileDB" ;
43- rev = version ;
44- hash = "sha256-uLiXhigYz3v7NgY38twot3sBHxZS5QCrOiPfME4wWzE =" ;
43+ tag = version ;
44+ hash = "sha256-zk4jkXJMh6wpuEKaCvuKUDod+F8B/6W5Lw8gwelcPEM =" ;
4545 } ;
4646
47- patches = [
48- ./FindMagic_EP.cmake.patch
49- ] ;
47+ patches = lib . optionals stdenv . hostPlatform . isDarwin [ ./generate_embedded_data_header.patch ] ;
5048
51- postPatch =
52- ''
53- # copy pre-fetched external project to directory where it is expected to be
54- mkdir -p build/externals/src
55- cp -a ${ ep-file-windows } build/externals/src/ep_magic
56- chmod -R u+w build/externals/src/ep_magic
57-
58- # add openssl on path
59- sed -i '49i list(APPEND OPENSSL_PATHS "${ openssl . dev } " "${ openssl . out } ")' \
60- cmake/Modules/FindOpenSSL_EP.cmake
61- ''
62- # libcxx (as of llvm-19) does not yet support `stop_token` and `jthread`
63- # without the -fexperimental-library flag. Tiledb adds its own
64- # implementations in the std namespace which conflict with libcxx. This
65- # test can be re-enabled once libcxx supports stop_token and jthread.
66- + lib . optionalString ( stdenv . cc . libcxx != null ) ''
67- truncate -s0 tiledb/stdx/test/CMakeLists.txt
68- '' ;
69-
70- # upstream will hopefully fix this in some newer release
71- env . CXXFLAGS = "-include random" ;
49+ # libcxx (as of llvm-19) does not yet support `stop_token` and `jthread`
50+ # without the -fexperimental-library flag. Tiledb adds its own
51+ # implementations in the std namespace which conflict with libcxx. This
52+ # test can be re-enabled once libcxx supports stop_token and jthread.
53+ postPatch = lib . optionalString ( stdenv . cc . libcxx != null ) ''
54+ truncate -s0 tiledb/stdx/test/CMakeLists.txt
55+ '' ;
56+
57+ env . TILEDB_DISABLE_AUTO_VCPKG = "1" ;
7258
7359 # (bundled) blosc headers have a warning on some archs that it will be using
7460 # unaccelerated routines.
7561 cmakeFlags = [
76- "-DTILEDB_VCPKG=OFF"
7762 "-DTILEDB_WEBP=OFF"
7863 "-DTILEDB_WERROR=OFF"
64+ # https://github.com/NixOS/nixpkgs/issues/144170
65+ "-DCMAKE_INSTALL_INCLUDEDIR=include"
66+ "-DCMAKE_INSTALL_LIBDIR=lib"
7967 ] ++ lib . optional ( ! useAVX2 ) "-DCOMPILER_SUPPORTS_AVX2=FALSE" ;
8068
8169 nativeBuildInputs = [
82- ep-file-windows
8370 catch2_3
8471 clang-tools
8572 cmake
8673 python3
8774 doxygen
8875 ] ++ lib . optional stdenv . hostPlatform . isDarwin fixDarwinDylibNames ;
8976
90- nativeCheckInputs = [
91- gtest
92- ] ;
93-
9477 buildInputs = [
9578 zlib
9679 lz4
@@ -101,20 +84,34 @@ stdenv.mkDerivation rec {
10184 openssl
10285 boost
10386 libpqxx
87+ libpng
88+ file
89+ rapidcheck'
90+ catch2
91+ ] ;
92+
93+ # fatal error: catch.hpp: No such file or directory
94+ doCheck = false ;
95+
96+ nativeCheckInputs = [
97+ gtest
98+ catch2
10499 ] ;
105100
106101 # test commands taken from
107102 # https://github.com/TileDB-Inc/TileDB/blob/dev/.github/workflows/unit-test-runs.yml
108103 checkPhase = ''
109104 runHook preCheck
110- make -C tiledb tests -j$NIX_BUILD_CORES
111- make -C tiledb test ARGS="-R '^unit_'" -R "test_assert"
112- make -C tiledb test ARGS="-R 'test_ci_asserts'"
105+
106+ pushd ..
107+ cmake --build build --target tests
108+ ctest --test-dir build -R '(^unit_|test_assert)' --no-tests=error
109+ ctest --test-dir build -R 'test_ci_asserts'
110+ popd
111+
113112 runHook postCheck
114113 '' ;
115114
116- doCheck = true ;
117-
118115 installTargets = [
119116 "install-tiledb"
120117 "doc"
@@ -124,11 +121,11 @@ stdenv.mkDerivation rec {
124121 install_name_tool -add_rpath ${ tbb } /lib $out/lib/libtiledb.dylib
125122 '' ;
126123
127- meta = with lib ; {
124+ meta = {
128125 description = "TileDB allows you to manage the massive dense and sparse multi-dimensional array data" ;
129126 homepage = "https://github.com/TileDB-Inc/TileDB" ;
130- license = licenses . mit ;
131- platforms = platforms . unix ;
132- maintainers = with maintainers ; [ rakesh4g ] ;
127+ license = lib . licenses . mit ;
128+ platforms = lib . platforms . unix ;
129+ maintainers = with lib . maintainers ; [ rakesh4g ] ;
133130 } ;
134131}
0 commit comments