arrow-cpp: refactor source fetching

This commit is contained in:
Phillip Cloud 2021-10-31 18:59:57 -04:00
parent 56cccec572
commit d96ab39a64
No known key found for this signature in database
GPG Key ID: D908212070FD785E

View File

@ -1,6 +1,6 @@
{ stdenv, lib, fetchurl, fetchFromGitHub, fixDarwinDylibNames { stdenv, lib, fetchurl, fetchFromGitHub, fixDarwinDylibNames
, autoconf, boost, brotli, cmake, flatbuffers, gflags, glog, gtest, lz4 , autoconf, boost, brotli, cmake, flatbuffers, gflags, glog, gtest, jemalloc
, perl, python3, rapidjson, re2, snappy, thrift, tzdata , utf8proc, which , lz4, perl, python3, rapidjson, re2, snappy, thrift, tzdata , utf8proc, which
, zlib, zstd , zlib, zstd
, enableShared ? !stdenv.hostPlatform.isStatic , enableShared ? !stdenv.hostPlatform.isStatic
}: }:
@ -31,22 +31,23 @@ in stdenv.mkDerivation rec {
}; };
sourceRoot = "apache-arrow-${version}/cpp"; sourceRoot = "apache-arrow-${version}/cpp";
ARROW_JEMALLOC_URL = fetchurl { ARROW_JEMALLOC_URL = jemalloc.src;
ARROW_MIMALLOC_URL = fetchFromGitHub {
# From # From
# ./cpp/cmake_modules/ThirdpartyToolchain.cmake # ./cpp/cmake_modules/ThirdpartyToolchain.cmake
# ./cpp/thirdparty/versions.txt # ./cpp/thirdparty/versions.txt
url = owner = "microsoft";
"https://github.com/jemalloc/jemalloc/releases/download/5.2.1/jemalloc-5.2.1.tar.bz2"; repo = "mimalloc";
hash = "sha256-NDMOXOJ2CZ4uiVDZM121qHVomkxqVnUe87HYxTf4h/Y="; rev = "v1.7.2";
hash = "sha256-yHupYFgC8mJuLUSpuEAfwF7l6Ue4EiuO1Q4qN4T6wWc=";
}; };
ARROW_MIMALLOC_URL = fetchurl { ARROW_XSIMD_URL = fetchFromGitHub {
# From owner = "xtensor-stack";
# ./cpp/cmake_modules/ThirdpartyToolchain.cmake repo = "xsimd";
# ./cpp/thirdparty/versions.txt rev = "aeec9c872c8b475dedd7781336710f2dd2666cb2";
url = hash = "sha256-vWKdJkieKhaxyAJhijXUmD7NmNvMWd79PskQojulA1w=";
"https://github.com/microsoft/mimalloc/archive/v1.7.2.tar.gz";
hash = "sha256-sZEuNUVlpLaYQQ91g8D4OTSm27Ot5Uq33csVaTIJNr0=";
}; };
patches = [ patches = [
@ -119,11 +120,6 @@ in stdenv.mkDerivation rec {
"-DCMAKE_INSTALL_RPATH=@loader_path/../lib" # needed for tools executables "-DCMAKE_INSTALL_RPATH=@loader_path/../lib" # needed for tools executables
] ++ lib.optional (!stdenv.isx86_64) "-DARROW_USE_SIMD=OFF"; ] ++ lib.optional (!stdenv.isx86_64) "-DARROW_USE_SIMD=OFF";
ARROW_XSIMD_URL = fetchurl {
url = "https://github.com/xtensor-stack/xsimd/archive/aeec9c872c8b475dedd7781336710f2dd2666cb2.tar.gz";
sha256 = "09kvl962c6b0wnb7pb2n9dhvkflzwalgq6gwwi8628fgi9n1x10a";
};
doInstallCheck = true; doInstallCheck = true;
ARROW_TEST_DATA = ARROW_TEST_DATA =
if doInstallCheck then "${arrow-testing}/data" else null; if doInstallCheck then "${arrow-testing}/data" else null;