Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

arrow-cpp: add GCS feature flag (#144610)

authored by

Phillip Cloud and committed by
GitHub
ea5437f8 a2f2e10e

+27 -3
+27 -3
pkgs/development/libraries/arrow-cpp/default.nix
··· 3 3 , fetchurl 4 4 , fetchFromGitHub 5 5 , fixDarwinDylibNames 6 + , abseil-cpp 6 7 , autoconf 7 8 , aws-sdk-cpp 8 9 , boost 9 10 , brotli 10 11 , c-ares 11 12 , cmake 13 + , crc32c 14 + , curl 12 15 , flatbuffers 13 16 , gflags 14 17 , glog 18 + , google-cloud-cpp 15 19 , grpc 16 20 , gtest 17 21 , jemalloc 18 22 , libnsl 19 23 , lz4 20 24 , minio 25 + , nlohmann_json 21 26 , openssl 22 27 , perl 23 28 , protobuf ··· 33 38 , zstd 34 39 , enableShared ? !stdenv.hostPlatform.isStatic 35 40 , enableFlight ? !stdenv.isDarwin # libnsl is not supported on darwin 36 - , enableS3 ? true 41 + # boost/process is broken in 1.69 on darwin, but fixed in 1.70 and 42 + # non-existent in older versions 43 + # see https://github.com/boostorg/process/issues/55 44 + , enableS3 ? (!stdenv.isDarwin) || (lib.versionOlder boost.version "1.69" || lib.versionAtLeast boost.version "1.70") 45 + , enableGcs ? !stdenv.isDarwin # google-cloud-cpp is not supported on darwin 37 46 }: 47 + 48 + assert lib.asserts.assertMsg 49 + ((enableS3 && stdenv.isDarwin) -> (lib.versionOlder boost.version "1.69" || lib.versionAtLeast boost.version "1.70")) 50 + "S3 on Darwin requires Boost != 1.69"; 38 51 39 52 let 40 53 arrow-testing = fetchFromGitHub { ··· 115 128 libnsl 116 129 openssl 117 130 protobuf 118 - ] ++ lib.optionals enableS3 [ aws-sdk-cpp openssl ]; 131 + ] ++ lib.optionals enableS3 [ aws-sdk-cpp openssl ] 132 + ++ lib.optionals enableGcs [ 133 + abseil-cpp 134 + crc32c 135 + curl 136 + google-cloud-cpp 137 + nlohmann_json 138 + ]; 119 139 120 140 preConfigure = '' 121 141 patchShebangs build-support/ ··· 152 172 "-DPARQUET_BUILD_EXECUTABLES=ON" 153 173 "-DARROW_FLIGHT=${if enableFlight then "ON" else "OFF"}" 154 174 "-DARROW_S3=${if enableS3 then "ON" else "OFF"}" 175 + "-DARROW_GCS=${if enableGcs then "ON" else "OFF"}" 155 176 ] ++ lib.optionals (!enableShared) [ 156 177 "-DARROW_TEST_LINKAGE=static" 157 178 ] ++ lib.optionals stdenv.isDarwin [ ··· 183 204 "TestS3FS.OpenOutputStreamMetadata" 184 205 "TestS3FS.OpenOutputStreamSyncWrites" 185 206 "TestS3FSGeneric.*" 207 + ] ++ lib.optionals enableGcs [ 208 + "GcsFileSystem.FileSystemCompare" 209 + "GcsIntegrationTest.*" 186 210 ]; 187 211 in 188 212 lib.optionalString doInstallCheck "-${builtins.concatStringsSep ":" filteredTests}"; ··· 199 223 '' 200 224 runHook preInstallCheck 201 225 202 - ctest -L unittest -V \ 226 + ctest -L unittest \ 203 227 --exclude-regex '^(${builtins.concatStringsSep "|" excludedTests})$' 204 228 205 229 runHook postInstallCheck