diff options
author | Tobias Mayer <tobim@fastmail.fm> | 2019-12-16 13:22:20 +0100 |
---|---|---|
committer | Tobias Mayer <tobim@fastmail.fm> | 2019-12-31 15:05:13 +0100 |
commit | 207db019cefd27b20e16609384ce1aedf998c991 (patch) | |
tree | 704970229033693fcb8035da7167cce43a090cae /pkgs/development/libraries/arrow-cpp | |
parent | 0a21b322346977d7413c8cd2a3d834d8f1b03c96 (diff) | |
download | nixpkgs-207db019cefd27b20e16609384ce1aedf998c991.tar nixpkgs-207db019cefd27b20e16609384ce1aedf998c991.tar.gz nixpkgs-207db019cefd27b20e16609384ce1aedf998c991.tar.bz2 nixpkgs-207db019cefd27b20e16609384ce1aedf998c991.tar.lz nixpkgs-207db019cefd27b20e16609384ce1aedf998c991.tar.xz nixpkgs-207db019cefd27b20e16609384ce1aedf998c991.tar.zst nixpkgs-207db019cefd27b20e16609384ce1aedf998c991.zip |
arrow-cpp: add pkgsStatic support
Diffstat (limited to 'pkgs/development/libraries/arrow-cpp')
-rw-r--r-- | pkgs/development/libraries/arrow-cpp/default.nix | 13 | ||||
-rw-r--r-- | pkgs/development/libraries/arrow-cpp/jemalloc-disable-shared.patch | 11 |
2 files changed, 22 insertions, 2 deletions
diff --git a/pkgs/development/libraries/arrow-cpp/default.nix b/pkgs/development/libraries/arrow-cpp/default.nix index f6f3493002a..587311a8cc3 100644 --- a/pkgs/development/libraries/arrow-cpp/default.nix +++ b/pkgs/development/libraries/arrow-cpp/default.nix @@ -1,6 +1,7 @@ { stdenv, fetchurl, fetchFromGitHub, fixDarwinDylibNames, autoconf, boost , 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 parquet-testing = fetchFromGitHub { @@ -34,6 +35,9 @@ in stdenv.mkDerivation rec { patches = [ # patch to fix python-test ./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 = [ @@ -71,8 +75,13 @@ in stdenv.mkDerivation rec { "-DARROW_DEPENDENCY_SOURCE=SYSTEM" "-DARROW_PARQUET=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" + ] ++ 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"; doInstallCheck = true; diff --git a/pkgs/development/libraries/arrow-cpp/jemalloc-disable-shared.patch b/pkgs/development/libraries/arrow-cpp/jemalloc-disable-shared.patch new file mode 100644 index 00000000000..0f7955724e1 --- /dev/null +++ b/pkgs/development/libraries/arrow-cpp/jemalloc-disable-shared.patch @@ -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 |