arrow-cpp: add pkgsStatic support
This commit is contained in:
parent
0a21b32234
commit
207db019ce
@ -1,6 +1,7 @@
|
|||||||
{ stdenv, fetchurl, fetchFromGitHub, fixDarwinDylibNames, autoconf, boost
|
{ stdenv, 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 }:
|
||||||
|
|
||||||
let
|
let
|
||||||
parquet-testing = fetchFromGitHub {
|
parquet-testing = fetchFromGitHub {
|
||||||
@ -34,6 +35,9 @@ in stdenv.mkDerivation rec {
|
|||||||
patches = [
|
patches = [
|
||||||
# patch to fix python-test
|
# patch to fix python-test
|
||||||
./darwin.patch
|
./darwin.patch
|
||||||
|
] ++ stdenv.lib.optionals (!enableShared) [
|
||||||
|
# The shared jemalloc lib is unused and breaks in static mode due to missing -fpic.
|
||||||
|
./jemalloc-disable-shared.patch
|
||||||
];
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
@ -71,8 +75,13 @@ in stdenv.mkDerivation rec {
|
|||||||
"-DARROW_DEPENDENCY_SOURCE=SYSTEM"
|
"-DARROW_DEPENDENCY_SOURCE=SYSTEM"
|
||||||
"-DARROW_PARQUET=ON"
|
"-DARROW_PARQUET=ON"
|
||||||
"-DARROW_PLASMA=ON"
|
"-DARROW_PLASMA=ON"
|
||||||
"-DARROW_PYTHON=ON"
|
# Disable Python for static mode because openblas is currently broken there.
|
||||||
|
"-DARROW_PYTHON=${if enableShared then "ON" else "OFF"}"
|
||||||
"-Duriparser_SOURCE=SYSTEM"
|
"-Duriparser_SOURCE=SYSTEM"
|
||||||
|
] ++ stdenv.lib.optionals (!enableShared) [
|
||||||
|
"-DARROW_BUILD_SHARED=OFF"
|
||||||
|
"-DARROW_TEST_LINKAGE=static"
|
||||||
|
"-DOPENSSL_USE_STATIC_LIBS=ON"
|
||||||
] ++ stdenv.lib.optional (!stdenv.isx86_64) "-DARROW_USE_SIMD=OFF";
|
] ++ stdenv.lib.optional (!stdenv.isx86_64) "-DARROW_USE_SIMD=OFF";
|
||||||
|
|
||||||
doInstallCheck = true;
|
doInstallCheck = true;
|
||||||
|
@ -0,0 +1,11 @@
|
|||||||
|
diff --git a/cmake_modules/ThirdpartyToolchain.cmake b/cmake_modules/ThirdpartyToolchain.cmake
|
||||||
|
--- a/cmake_modules/ThirdpartyToolchain.cmake
|
||||||
|
+++ b/cmake_modules/ThirdpartyToolchain.cmake
|
||||||
|
@@ -1428,6 +1428,7 @@ if(ARROW_JEMALLOC)
|
||||||
|
"--with-jemalloc-prefix=je_arrow_"
|
||||||
|
"--with-private-namespace=je_arrow_private_"
|
||||||
|
"--without-export"
|
||||||
|
+ "--disable-shared"
|
||||||
|
# Don't override operator new()
|
||||||
|
"--disable-cxx" "--disable-libdl"
|
||||||
|
# See https://github.com/jemalloc/jemalloc/issues/1237
|
@ -162,6 +162,10 @@ in {
|
|||||||
# --disable-shared flag
|
# --disable-shared flag
|
||||||
stdenv = super.stdenv;
|
stdenv = super.stdenv;
|
||||||
};
|
};
|
||||||
|
arrow-cpp = super.arrow-cpp.override {
|
||||||
|
enableShared = false;
|
||||||
|
python = { pkgs = { python = null; numpy = null; }; };
|
||||||
|
};
|
||||||
boost = super.boost.override {
|
boost = super.boost.override {
|
||||||
enableStatic = true;
|
enableStatic = true;
|
||||||
enableShared = false;
|
enableShared = false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user