git.iko.soy/typeable/nixpkgs
on master help sign in
arrow-cpp, pythonPackages.pyarrow: 0.11.0 -> 0.12.0
commit77e6dcb338da4fdc813739eafe6394c41a6f31ec authorDmitry Kalinkin <dmitry.kalinkin@gmail.com> dateSun 20 Jan 2019, 21:14 (8 years ago) parent3cac599
4 files changed+13−73
pkgs/development/libraries/arrow-cpp/default.nix+5−10 pkgs/development/libraries/arrow-cpp/double-conversion_cmake.patch−43 pkgs/development/libraries/arrow-cpp/zstd136.patch−17 pkgs/development/python-modules/pyarrow/default.nix+8−3
pkgs/development/libraries/arrow-cpp/default.nix+5−10
@@ -1,4 +1,4 @@
1−{ stdenv, symlinkJoin, fetchurl, fetchFromGitHub, boost, brotli, cmake, double-conversion, flatbuffers, gflags, glog, gtest, lz4, perl, python, rapidjson, snappy, thrift, which, zlib, zstd }:
1+{ stdenv, symlinkJoin, fetchurl, fetchFromGitHub, autoconf, boost, brotli, cmake, double-conversion, flatbuffers, gflags, glog, gtest, lz4, perl, python, rapidjson, snappy, thrift, which, zlib, zstd }:
22
33let
44 parquet-testing = fetchFromGitHub {
@@ -11,27 +11,21 @@ in
1111
1212stdenv.mkDerivation rec {
1313 name = "arrow-cpp-${version}";
14− version = "0.11.0";
14+ version = "0.12.0";
1515
1616 src = fetchurl {
1717 url = "mirror://apache/arrow/arrow-${version}/apache-arrow-${version}.tar.gz";
18− sha256 = "0pc5pqr0dbnx8s1ji102dhw9bbrsq3ml4ac3mmi2022yfyizlf0q";
18+ sha256 = "163s4i2cywq95jgrxbaq48qwmww0ibkq61k1aad4w9z9vpjfgnil";
1919 };
2020
2121 sourceRoot = "apache-arrow-${version}/cpp";
2222
2323 patches = [
24− # fix ARROW-3467
25− ./double-conversion_cmake.patch
26−
2724 # patch to fix python-test
2825 ./darwin.patch
29−
30− # facebook/zstd#1385
31− ./zstd136.patch
3226 ];
3327
34− nativeBuildInputs = [ cmake ];
28+ nativeBuildInputs = [ cmake autoconf /* for vendored jemalloc */ ];
3529 buildInputs = [ boost double-conversion glog python.pkgs.python python.pkgs.numpy ];
3630
3731 preConfigure = ''
@@ -58,6 +52,7 @@ stdenv.mkDerivation rec {
5852 ZSTD_HOME = zstd;
5953
6054 cmakeFlags = [
55+ "-DARROW_BUILD_TESTS=ON"
6156 "-DARROW_PYTHON=ON"
6257 "-DARROW_PARQUET=ON"
6358 ];
pkgs/development/libraries/arrow-cpp/double-conversion_cmake.patchdeleted−43
@@ -1,43 +0,0 @@
1−diff --git a/CMakeLists.txt b/cpp/CMakeLists.txt
2−--- a/CMakeLists.txt
3−+++ b/CMakeLists.txt
4−@@ -615,7 +615,7 @@ endif(UNIX)
5− set(ARROW_LINK_LIBS)
6−
7− # Libraries to link statically with libarrow.so
8−-set(ARROW_STATIC_LINK_LIBS double-conversion)
9−+set(ARROW_STATIC_LINK_LIBS ${DOUBLE_CONVERSION_TARGET})
10−
11− if (ARROW_WITH_BROTLI)
12− SET(ARROW_STATIC_LINK_LIBS
13−@@ -694,7 +694,7 @@ else ()
14− set(ARROW_MIN_TEST_LIBS
15− arrow_shared
16− ${ARROW_LINK_LIBS}
17−- double-conversion
18−+ ${DOUBLE_CONVERSION_TARGET}
19− ${BOOST_SYSTEM_LIBRARY}
20− ${BOOST_FILESYSTEM_LIBRARY}
21− ${BOOST_REGEX_LIBRARY}
22−diff --git a/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake
23−--- a/cmake_modules/ThirdpartyToolchain.cmake
24−+++ b/cmake_modules/ThirdpartyToolchain.cmake
25−@@ -469,14 +469,16 @@ if("${DOUBLE_CONVERSION_HOME}" STREQUAL "")
26− set(DOUBLE_CONVERSION_VENDORED 1)
27− else()
28− find_package(double-conversion REQUIRED)
29−+ set(DOUBLE_CONVERSION_TARGET double-conversion::double-conversion)
30− set(DOUBLE_CONVERSION_VENDORED 0)
31− endif()
32−
33− include_directories(SYSTEM ${DOUBLE_CONVERSION_INCLUDE_DIR})
34−-ADD_THIRDPARTY_LIB(double-conversion
35−- STATIC_LIB ${DOUBLE_CONVERSION_STATIC_LIB})
36−
37− if (DOUBLE_CONVERSION_VENDORED)
38−+ ADD_THIRDPARTY_LIB(double-conversion
39−+ STATIC_LIB ${DOUBLE_CONVERSION_STATIC_LIB})
40−+ set(DOUBLE_CONVERSION_TARGET double-conversion)
41− add_dependencies(arrow_dependencies double-conversion_ep)
42− endif()
43−
pkgs/development/libraries/arrow-cpp/zstd136.patchdeleted−17
@@ -1,17 +0,0 @@
1−--- a/src/arrow/util/compression_zstd.cc
2−+++ b/src/arrow/util/compression_zstd.cc
3−@@ -35,8 +35,13 @@ namespace util {
4−
5− Status ZSTDCodec::Decompress(int64_t input_len, const uint8_t* input, int64_t output_len,
6− uint8_t* output_buffer) {
7−+ void *safe_output_buffer = static_cast<void*>(output_buffer);
8−+ int dummy {};
9−+ if ((output_len == 0) && (output_buffer == NULL)) {
10−+ safe_output_buffer = static_cast<void*>(&dummy);
11−+ }
12− int64_t decompressed_size =
13−- ZSTD_decompress(output_buffer, static_cast<size_t>(output_len), input,
14−+ ZSTD_decompress(safe_output_buffer, static_cast<size_t>(output_len), input,
15− static_cast<size_t>(input_len));
16− if (decompressed_size != output_len) {
17− return Status::IOError("Corrupt ZSTD compressed data.");
pkgs/development/python-modules/pyarrow/default.nix+8−3
@@ -1,4 +1,4 @@
1−{ lib, buildPythonPackage, python, isPy3k, fetchurl, arrow-cpp, cmake, cython, futures, numpy, pandas, pytest, pkgconfig, setuptools_scm, six }:
1+{ lib, buildPythonPackage, python, isPy3k, fetchurl, arrow-cpp, cmake, cython, futures, hypothesis, numpy, pandas, pytest, pkgconfig, setuptools_scm, six }:
22
33let
44 _arrow-cpp = arrow-cpp.override { inherit python; };
@@ -13,10 +13,15 @@ buildPythonPackage rec {
1313
1414 nativeBuildInputs = [ cmake cython pkgconfig setuptools_scm ];
1515 propagatedBuildInputs = [ numpy six ] ++ lib.optionals (!isPy3k) [ futures ];
16− checkInputs = [ pandas pytest ];
16+ checkInputs = [ hypothesis pandas pytest ];
1717
1818 PYARROW_BUILD_TYPE = "release";
19− PYARROW_CMAKE_OPTIONS = "-DCMAKE_INSTALL_RPATH=${ARROW_HOME}/lib";
19+ PYARROW_CMAKE_OPTIONS = [
20+ "-DCMAKE_INSTALL_RPATH=${ARROW_HOME}/lib"
21+
22+ # for some reason cmake won't set -std=c++11 for clang
23+ "-DPYARROW_CXXFLAGS=-std=c++11"
24+ ];
2025
2126 preCheck = ''
2227 rm pyarrow/tests/test_jvm.py