folly: use sanitiseHeaderPathsHook

This commit is contained in:
Emily 2025-06-20 11:15:57 +01:00
parent 651c77c71e
commit 363f75d245

View File

@ -8,7 +8,7 @@
cmake, cmake,
ninja, ninja,
pkg-config, pkg-config,
removeReferencesTo, sanitiseHeaderPathsHook,
double-conversion, double-conversion,
fast-float, fast-float,
@ -59,7 +59,7 @@ stdenv.mkDerivation (finalAttrs: {
cmake cmake
ninja ninja
pkg-config pkg-config
removeReferencesTo sanitiseHeaderPathsHook
]; ];
# See CMake/folly-deps.cmake in the Folly source tree. # See CMake/folly-deps.cmake in the Folly source tree.
@ -192,18 +192,6 @@ stdenv.mkDerivation (finalAttrs: {
runHook postCheck runHook postCheck
''; '';
postFixup = ''
# Sanitize header paths to avoid runtime dependencies leaking in
# through `__FILE__`.
(
shopt -s globstar
for header in "$dev/include"/**/*.h; do
sed -i "1i#line 1 \"$header\"" "$header"
remove-references-to -t "$dev" "$header"
done
)
'';
passthru = { passthru = {
inherit boost; inherit boost;
fmt = fmt_11; fmt = fmt_11;