git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #120854 from tobim/pkgs/arrow-cpp-4.0.0

arrow-cpp: 3.0.0 -> 4.0.0

commit275624a2263502f8344a2e4654c16bebef6a96e4 authorDmitry Kalinkin <dmitry.kalinkin@gmail.com> dateFri 30 Apr 2021, 20:06 (6 years ago) parentcd5f2292d9f3e3
4 files changed+82−12
pkgs/development/libraries/arrow-cpp/default.nix+13−6 pkgs/development/libraries/xsimd/default.nix+56 pkgs/development/python-modules/pyarrow/default.nix+11−6 pkgs/top-level/all-packages.nix+2
pkgs/development/libraries/arrow-cpp/default.nix+13−6
@@ -1,6 +1,7 @@
1−{ stdenv, lib, fetchurl, fetchFromGitHub, fetchpatch, fixDarwinDylibNames
1+{ stdenv, lib, fetchurl, fetchFromGitHub, fixDarwinDylibNames
22, autoconf, boost, brotli, cmake, flatbuffers, gflags, glog, gtest, lz4
3−, perl, python3, rapidjson, re2, snappy, thrift, utf8proc, which, zlib, zstd
3+, perl, python3, rapidjson, re2, snappy, thrift, utf8proc, which, xsimd
4+, zlib, zstd
45, enableShared ? !stdenv.hostPlatform.isStatic
56}:
67
@@ -15,18 +16,18 @@ let
1516 parquet-testing = fetchFromGitHub {
1617 owner = "apache";
1718 repo = "parquet-testing";
18− rev = "e31fe1a02c9e9f271e4bfb8002d403c52f1ef8eb";
19− sha256 = "02f51dvx8w5mw0bx3hn70hkn55mn1m65kzdps1ifvga9hghpy0sh";
19+ rev = "ddd898958803cb89b7156c6350584d1cda0fe8de";
20+ sha256 = "0n16xqlpxn2ryp43w8pppxrbwmllx6sk4hv3ycgikfj57nd3ibc0";
2021 };
2122
2223in stdenv.mkDerivation rec {
2324 pname = "arrow-cpp";
24− version = "3.0.0";
25+ version = "4.0.0";
2526
2627 src = fetchurl {
2728 url =
2829 "mirror://apache/arrow/arrow-${version}/apache-arrow-${version}.tar.gz";
29− sha256 = "0yp2b02wrc3s50zd56fmpz4nhhbihp0zw329v4zizaipwlxwrhkk";
30+ sha256 = "1bj9jr0pgq9f2nyzqiyj3cl0hcx3c83z2ym6rpdkp59ff2zx0caa";
3031 };
3132 sourceRoot = "apache-arrow-${version}/cpp";
3233
@@ -90,6 +91,10 @@ in stdenv.mkDerivation rec {
9091 "-DARROW_VERBOSE_THIRDPARTY_BUILD=ON"
9192 "-DARROW_DEPENDENCY_SOURCE=SYSTEM"
9293 "-DARROW_DEPENDENCY_USE_SHARED=${if enableShared then "ON" else "OFF"}"
94+ "-DARROW_COMPUTE=ON"
95+ "-DARROW_CSV=ON"
96+ "-DARROW_DATASET=ON"
97+ "-DARROW_JSON=ON"
9398 "-DARROW_PLASMA=ON"
9499 # Disable Python for static mode because openblas is currently broken there.
95100 "-DARROW_PYTHON=${if enableShared then "ON" else "OFF"}"
@@ -111,6 +116,8 @@ in stdenv.mkDerivation rec {
111116 "-DCMAKE_INSTALL_RPATH=@loader_path/../lib" # needed for tools executables
112117 ] ++ lib.optional (!stdenv.isx86_64) "-DARROW_USE_SIMD=OFF";
113118
119+ ARROW_XSIMD_URL = xsimd.src;
120+
114121 doInstallCheck = true;
115122 ARROW_TEST_DATA =
116123 if doInstallCheck then "${arrow-testing}/data" else null;
pkgs/development/libraries/xsimd/default.nixnew file+56
@@ -0,0 +1,56 @@
1+{ lib, stdenv, fetchFromGitHub, cmake, gtest }:
2+let
3+ version = "7.5.0";
4+
5+ darwin_src = fetchFromGitHub {
6+ owner = "xtensor-stack";
7+ repo = "xsimd";
8+ rev = version;
9+ sha256 = "eGAdRSYhf7rbFdm8g1Tz1ZtSVu44yjH/loewblhv9Vs=";
10+ # Avoid requiring apple_sdk. We're doing this here instead of in the patchPhase
11+ # because this source is directly used in arrow-cpp.
12+ # pyconfig.h defines _GNU_SOURCE to 1, so we need to stamp that out too.
13+ # Upstream PR with a better fix: https://github.com/xtensor-stack/xsimd/pull/463
14+ postFetch = ''
15+ mkdir $out
16+ tar -xf $downloadedFile --directory=$out --strip-components=1
17+ substituteInPlace $out/include/xsimd/types/xsimd_scalar.hpp \
18+ --replace 'defined(__APPLE__)' 0 \
19+ --replace 'defined(_GNU_SOURCE)' 0
20+ '';
21+ };
22+
23+ src = fetchFromGitHub {
24+ owner = "xtensor-stack";
25+ repo = "xsimd";
26+ rev = version;
27+ sha256 = "0c9pq5vz43j99z83w3b9qylfi66mn749k1afpv5cwfxggbxvy63f";
28+ };
29+in stdenv.mkDerivation {
30+ pname = "xsimd";
31+ inherit version;
32+ src = if stdenv.hostPlatform.isDarwin then darwin_src else src;
33+
34+ nativeBuildInputs = [ cmake ];
35+
36+ cmakeFlags = [ "-DBUILD_TESTS=ON" ];
37+
38+ doCheck = true;
39+ checkInputs = [ gtest ];
40+ checkTarget = "xtest";
41+ GTEST_FILTER = let
42+ # Upstream Issue: https://github.com/xtensor-stack/xsimd/issues/456
43+ filteredTests = lib.optionals stdenv.hostPlatform.isDarwin [
44+ "error_gamma_test/sse_double.gamma"
45+ "error_gamma_test/avx_double.gamma"
46+ ];
47+ in "-${builtins.concatStringsSep ":" filteredTests}";
48+
49+ meta = with lib; {
50+ description = "C++ wrappers for SIMD intrinsics";
51+ homepage = "https://github.com/xtensor-stack/xsimd";
52+ license = licenses.bsd3;
53+ maintainers = with maintainers; [ tobim ];
54+ platforms = platforms.all;
55+ };
56+}
pkgs/development/python-modules/pyarrow/default.nix+11−6
@@ -34,12 +34,17 @@ buildPythonPackage rec {
3434 export PYARROW_PARALLEL=$NIX_BUILD_CORES
3535 '';
3636
37− # Deselect a single test because pyarrow prints a 2-line error message where
38− # only a single line is expected. The additional line of output comes from
39− # the glog library which is an optional dependency of arrow-cpp that is
40− # enabled in nixpkgs.
41− # Upstream Issue: https://issues.apache.org/jira/browse/ARROW-11393
42− pytestFlagsArray = [ "--deselect=pyarrow/tests/test_memory.py::test_env_var" ];
37+ pytestFlagsArray = [
38+ # Deselect a single test because pyarrow prints a 2-line error message where
39+ # only a single line is expected. The additional line of output comes from
40+ # the glog library which is an optional dependency of arrow-cpp that is
41+ # enabled in nixpkgs.
42+ # Upstream Issue: https://issues.apache.org/jira/browse/ARROW-11393
43+ "--deselect=pyarrow/tests/test_memory.py::test_env_var"
44+ # Deselect the parquet dataset write test because it erroneously fails to find the
45+ # pyarrow._dataset module.
46+ "--deselect=pyarrow/tests/parquet/test_dataset.py::test_write_to_dataset_filesystem"
47+ ];
4348
4449 dontUseSetuptoolsCheck = true;
4550 preCheck = ''
pkgs/top-level/all-packages.nix+2
@@ -18104,6 +18104,8 @@ in
1810418104
1810518105 xlslib = callPackage ../development/libraries/xlslib { };
1810618106
18107+ xsimd = callPackage ../development/libraries/xsimd { };
18108+
1810718109 xvidcore = callPackage ../development/libraries/xvidcore { };
1810818110
1810918111 xxHash = callPackage ../development/libraries/xxHash {};