parquet-cpp: init at 1.4.0
Also fix RPATH issues in pyarrow
This commit is contained in:
parent
f9192c5424
commit
a49ebbb743
37
pkgs/development/libraries/parquet-cpp/default.nix
Normal file
37
pkgs/development/libraries/parquet-cpp/default.nix
Normal file
@ -0,0 +1,37 @@
|
||||
{ stdenv, symlinkJoin, fetchurl, arrow-cpp, boost, cmake, gtest, snappy, thrift, zlib }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "parquet-cpp-${version}";
|
||||
version = "1.4.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/apache/parquet-cpp/archive/apache-${name}.tar.gz";
|
||||
sha256 = "1kn7pjzi5san5f05qbl8l8znqsa3f9cq9bflfr4s2jfwr7k9p2aj";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
buildInputs = [ boost ];
|
||||
|
||||
preConfigure = ''
|
||||
substituteInPlace cmake_modules/FindThrift.cmake --replace CMAKE_STATIC_LIBRARY CMAKE_SHARED_LIBRARY
|
||||
substituteInPlace cmake_modules/FindSnappy.cmake --replace CMAKE_STATIC_LIBRARY CMAKE_SHARED_LIBRARY
|
||||
'';
|
||||
|
||||
ARROW_HOME = arrow-cpp;
|
||||
THRIFT_HOME = thrift;
|
||||
GTEST_HOME = gtest;
|
||||
SNAPPY_HOME = symlinkJoin { name="snappy-wrap"; paths = [ snappy snappy.dev ]; };
|
||||
ZLIB_HOME = symlinkJoin { name="zlib-wrap"; paths = [ zlib.dev zlib.static ]; };
|
||||
|
||||
cmakeFlags = [
|
||||
"-DPARQUET_BUILD_BENCHMARKS=OFF"
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "A C++ library to read and write the Apache Parquet columnar data format";
|
||||
homepage = http://parquet.apache.org;
|
||||
license = stdenv.lib.licenses.asl20;
|
||||
platforms = stdenv.lib.platforms.unix;
|
||||
maintainers = with stdenv.lib.maintainers; [ veprbl ];
|
||||
};
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
{ lib, buildPythonPackage, fetchurl, arrow-cpp, cmake, cython, futures, numpy, pandas, pytest, pkgconfig, setuptools_scm, six }:
|
||||
{ lib, buildPythonPackage, fetchurl, arrow-cpp, cmake, cython, futures, numpy, pandas, pytest, parquet-cpp, pkgconfig, setuptools_scm, six }:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pyarrow";
|
||||
@ -16,10 +16,14 @@ buildPythonPackage rec {
|
||||
checkInputs = [ pandas pytest ];
|
||||
|
||||
PYARROW_BUILD_TYPE = "release";
|
||||
PYARROW_BUNDLE_ARROW_CPP = 1; # sets RPATH on darwin
|
||||
PYARROW_CMAKE_OPTIONS = "-DCMAKE_INSTALL_RPATH=${ARROW_HOME}/lib;${PARQUET_HOME}/lib";
|
||||
|
||||
preBuild = ''
|
||||
substituteInPlace CMakeLists.txt --replace "''${ARROW_SO_VERSION}" '"0"'
|
||||
substituteInPlace CMakeLists.txt --replace "\''${ARROW_ABI_VERSION}" '"0.0.0"'
|
||||
substituteInPlace CMakeLists.txt --replace "\''${ARROW_SO_VERSION}" '"0"'
|
||||
|
||||
# fix the hardcoded value
|
||||
substituteInPlace cmake_modules/FindParquet.cmake --replace 'set(PARQUET_ABI_VERSION "1.0.0")' 'set(PARQUET_ABI_VERSION "${parquet-cpp.version}")'
|
||||
'';
|
||||
|
||||
preCheck = ''
|
||||
@ -36,6 +40,9 @@ buildPythonPackage rec {
|
||||
'';
|
||||
|
||||
ARROW_HOME = arrow-cpp;
|
||||
PARQUET_HOME = parquet-cpp;
|
||||
|
||||
setupPyBuildFlags = ["--with-parquet" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A cross-language development platform for in-memory data";
|
||||
|
@ -10872,6 +10872,8 @@ with pkgs;
|
||||
|
||||
paperkey = callPackage ../tools/security/paperkey { };
|
||||
|
||||
parquet-cpp = callPackage ../development/libraries/parquet-cpp {};
|
||||
|
||||
pangoxsl = callPackage ../development/libraries/pangoxsl { };
|
||||
|
||||
pcaudiolib = callPackage ../development/libraries/pcaudiolib {
|
||||
|
Loading…
Reference in New Issue
Block a user