diff --git a/pkgs/by-name/fo/folly/install-test-certs.patch b/pkgs/by-name/fo/folly/install-test-certs.patch new file mode 100644 index 000000000000..59b981d2dbd8 --- /dev/null +++ b/pkgs/by-name/fo/folly/install-test-certs.patch @@ -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 diff --git a/pkgs/by-name/fo/folly/package.nix b/pkgs/by-name/fo/folly/package.nix index 48a04df5ce1f..cce2c4aee1c9 100644 --- a/pkgs/by-name/fo/folly/package.nix +++ b/pkgs/by-name/fo/folly/package.nix @@ -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` output’s 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