summary refs log tree commit diff
path: root/pkgs/development/libraries/arrow-cpp
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/libraries/arrow-cpp')
-rw-r--r--pkgs/development/libraries/arrow-cpp/cmake-find-protobuf.patch18
-rw-r--r--pkgs/development/libraries/arrow-cpp/default.nix2
2 files changed, 20 insertions, 0 deletions
diff --git a/pkgs/development/libraries/arrow-cpp/cmake-find-protobuf.patch b/pkgs/development/libraries/arrow-cpp/cmake-find-protobuf.patch
new file mode 100644
index 00000000000..5655c151e2f
--- /dev/null
+++ b/pkgs/development/libraries/arrow-cpp/cmake-find-protobuf.patch
@@ -0,0 +1,18 @@
+diff --git a/cmake_modules/FindProtobufAlt.cmake b/cmake_modules/FindProtobufAlt.cmake
+index d29f757ae..61c6e16e1 100644
+--- a/cmake_modules/FindProtobufAlt.cmake
++++ b/cmake_modules/FindProtobufAlt.cmake
+@@ -22,11 +22,8 @@ else()
+ endif()
+ 
+ set(find_package_args)
+-if(ProtobufAlt_FIND_VERSION)
+-  list(APPEND find_package_args ${ProtobufAlt_FIND_VERSION})
+-endif()
+ if(ProtobufAlt_FIND_QUIETLY)
+   list(APPEND find_package_args QUIET)
+ endif()
+-find_package(Protobuf ${find_package_args})
+-set(ProtobufAlt_FOUND ${Protobuf_FOUND})
++find_package(protobuf ${find_package_args})
++set(ProtobufAlt_FOUND ${protobuf_FOUND})
diff --git a/pkgs/development/libraries/arrow-cpp/default.nix b/pkgs/development/libraries/arrow-cpp/default.nix
index 4d89ce13967..c1bbc3e303d 100644
--- a/pkgs/development/libraries/arrow-cpp/default.nix
+++ b/pkgs/development/libraries/arrow-cpp/default.nix
@@ -122,6 +122,7 @@ stdenv.mkDerivation rec {
   patches = [
     # patch to fix python-test
     ./darwin.patch
+    ./cmake-find-protobuf.patch
   ];
 
   nativeBuildInputs = [
@@ -169,6 +170,7 @@ stdenv.mkDerivation rec {
   '';
 
   cmakeFlags = [
+    "-DCMAKE_FIND_PACKAGE_PREFER_CONFIG=ON"
     "-DARROW_BUILD_SHARED=${if enableShared then "ON" else "OFF"}"
     "-DARROW_BUILD_STATIC=${if enableShared then "OFF" else "ON"}"
     "-DARROW_BUILD_TESTS=ON"