mvfst: use sanitiseHeaderPathsHook

This commit is contained in:
Emily
2025-07-04 12:02:26 +01:00
parent 277d5ce661
commit aa5b3270d1
+2 -17
View File
@@ -6,7 +6,7 @@
cmake,
ninja,
removeReferencesTo,
sanitiseHeaderPathsHook,
folly,
gflags,
@@ -43,7 +43,7 @@ stdenv.mkDerivation (finalAttrs: {
nativeBuildInputs = [
cmake
ninja
removeReferencesTo
sanitiseHeaderPathsHook
];
buildInputs = [
@@ -123,21 +123,6 @@ stdenv.mkDerivation (finalAttrs: {
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
)
# TODO: Do this in `gtest` rather than downstream.
remove-references-to -t ${gtest.dev} $out/lib/*
'';
passthru.updateScript = nix-update-script { };
meta = {