mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-30 16:53:40 +00:00
arrow-cpp: add lib parameter
This commit is contained in:
parent
207db019ce
commit
cdbf3f78bf
@ -1,4 +1,4 @@
|
|||||||
{ stdenv, fetchurl, fetchFromGitHub, fixDarwinDylibNames, autoconf, boost
|
{ stdenv, lib, fetchurl, fetchFromGitHub, fixDarwinDylibNames, autoconf, boost
|
||||||
, brotli, cmake, double-conversion, flatbuffers, gflags, glog, gtest, lz4, perl
|
, brotli, cmake, double-conversion, flatbuffers, gflags, glog, gtest, lz4, perl
|
||||||
, python, rapidjson, snappy, thrift, uriparser, which, zlib, zstd
|
, python, rapidjson, snappy, thrift, uriparser, which, zlib, zstd
|
||||||
, enableShared ? true }:
|
, enableShared ? true }:
|
||||||
@ -35,7 +35,7 @@ in stdenv.mkDerivation rec {
|
|||||||
patches = [
|
patches = [
|
||||||
# patch to fix python-test
|
# patch to fix python-test
|
||||||
./darwin.patch
|
./darwin.patch
|
||||||
] ++ stdenv.lib.optionals (!enableShared) [
|
] ++ lib.optionals (!enableShared) [
|
||||||
# The shared jemalloc lib is unused and breaks in static mode due to missing -fpic.
|
# The shared jemalloc lib is unused and breaks in static mode due to missing -fpic.
|
||||||
./jemalloc-disable-shared.patch
|
./jemalloc-disable-shared.patch
|
||||||
];
|
];
|
||||||
@ -44,7 +44,7 @@ in stdenv.mkDerivation rec {
|
|||||||
cmake
|
cmake
|
||||||
autoconf # for vendored jemalloc
|
autoconf # for vendored jemalloc
|
||||||
flatbuffers
|
flatbuffers
|
||||||
] ++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames;
|
] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames;
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
boost
|
boost
|
||||||
brotli
|
brotli
|
||||||
@ -78,23 +78,23 @@ in stdenv.mkDerivation rec {
|
|||||||
# Disable Python for static mode because openblas is currently broken there.
|
# Disable Python for static mode because openblas is currently broken there.
|
||||||
"-DARROW_PYTHON=${if enableShared then "ON" else "OFF"}"
|
"-DARROW_PYTHON=${if enableShared then "ON" else "OFF"}"
|
||||||
"-Duriparser_SOURCE=SYSTEM"
|
"-Duriparser_SOURCE=SYSTEM"
|
||||||
] ++ stdenv.lib.optionals (!enableShared) [
|
] ++ lib.optionals (!enableShared) [
|
||||||
"-DARROW_BUILD_SHARED=OFF"
|
"-DARROW_BUILD_SHARED=OFF"
|
||||||
"-DARROW_TEST_LINKAGE=static"
|
"-DARROW_TEST_LINKAGE=static"
|
||||||
"-DOPENSSL_USE_STATIC_LIBS=ON"
|
"-DOPENSSL_USE_STATIC_LIBS=ON"
|
||||||
] ++ stdenv.lib.optional (!stdenv.isx86_64) "-DARROW_USE_SIMD=OFF";
|
] ++ lib.optional (!stdenv.isx86_64) "-DARROW_USE_SIMD=OFF";
|
||||||
|
|
||||||
doInstallCheck = true;
|
doInstallCheck = true;
|
||||||
PARQUET_TEST_DATA =
|
PARQUET_TEST_DATA =
|
||||||
if doInstallCheck then "${parquet-testing}/data" else null;
|
if doInstallCheck then "${parquet-testing}/data" else null;
|
||||||
installCheckInputs = [ perl which ];
|
installCheckInputs = [ perl which ];
|
||||||
installCheckPhase = (stdenv.lib.optionalString stdenv.isDarwin ''
|
installCheckPhase = (lib.optionalString stdenv.isDarwin ''
|
||||||
for f in release/*test{,s}; do
|
for f in release/*test{,s}; do
|
||||||
install_name_tool -add_rpath "$out"/lib "$f"
|
install_name_tool -add_rpath "$out"/lib "$f"
|
||||||
done
|
done
|
||||||
'')
|
'')
|
||||||
+ (let
|
+ (let
|
||||||
excludedTests = stdenv.lib.optionals stdenv.isDarwin [
|
excludedTests = lib.optionals stdenv.isDarwin [
|
||||||
# Some plasma tests need to be patched to use a shorter AF_UNIX socket
|
# Some plasma tests need to be patched to use a shorter AF_UNIX socket
|
||||||
# path on Darwin. See https://github.com/NixOS/nix/pull/1085
|
# path on Darwin. See https://github.com/NixOS/nix/pull/1085
|
||||||
"plasma-external-store-tests"
|
"plasma-external-store-tests"
|
||||||
@ -108,8 +108,8 @@ in stdenv.mkDerivation rec {
|
|||||||
meta = {
|
meta = {
|
||||||
description = "A cross-language development platform for in-memory data";
|
description = "A cross-language development platform for in-memory data";
|
||||||
homepage = "https://arrow.apache.org/";
|
homepage = "https://arrow.apache.org/";
|
||||||
license = stdenv.lib.licenses.asl20;
|
license = lib.licenses.asl20;
|
||||||
platforms = stdenv.lib.platforms.unix;
|
platforms = lib.platforms.unix;
|
||||||
maintainers = with stdenv.lib.maintainers; [ tobim veprbl ];
|
maintainers = with lib.maintainers; [ tobim veprbl ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user