folly: add patch to install the test certificates

This commit is contained in:
Emily
2025-09-16 02:26:59 +01:00
parent 4ee6a414d2
commit 84d47ed869
2 changed files with 23 additions and 0 deletions
@@ -0,0 +1,18 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ecc11a7961..67a2b82b4b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -489,8 +489,12 @@
${FOLLY_DIR}/test/DeterministicSchedule.cpp
${FOLLY_DIR}/json/JsonTestUtil.cpp
)
+auto_sources(test_certs "*.pem" "${FOLLY_DIR}/io/async/test/certs")
+install(FILES ${test_certs}
+ DESTINATION "${LIB_INSTALL_DIR}/folly/test-certs"
+)
target_compile_definitions(folly_test_util PUBLIC
- FOLLY_CERTS_DIR="${FOLLY_DIR}/io/async/test/certs"
+ FOLLY_CERTS_DIR="${LIB_INSTALL_DIR}/folly/test-certs"
)
set_property(TARGET folly_test_util PROPERTY VERSION ${PACKAGE_VERSION})
target_link_libraries(folly_test_util
+5
View File
@@ -129,6 +129,11 @@ stdenv.mkDerivation (finalAttrs: {
dontUseNinjaCheck = true;
patches = [
# Install the certificate files used by `libfolly_test_util` rather
# than leaving a dangling reference to the build directory in the
# `dev` outputs CMake files.
./install-test-certs.patch
# The base template for std::char_traits has been removed in LLVM 19
# https://releases.llvm.org/19.1.0/projects/libcxx/docs/ReleaseNotes.html
./char_traits.patch