fbthrift: use sanitiseHeaderPathsHook

This commit is contained in:
Emily
2025-07-04 12:02:26 +01:00
parent efab895df7
commit 6e7fd3cf13
+2 -14
View File
@@ -7,7 +7,7 @@
cmake,
ninja,
removeReferencesTo,
sanitiseHeaderPathsHook,
openssl,
gflags,
@@ -64,7 +64,7 @@ stdenv.mkDerivation (finalAttrs: {
nativeBuildInputs = [
cmake
ninja
removeReferencesTo
sanitiseHeaderPathsHook
];
buildInputs = [
@@ -104,18 +104,6 @@ stdenv.mkDerivation (finalAttrs: {
(lib.cmakeFeature "CMAKE_SHARED_LINKER_FLAGS" "-Wl,-undefined,dynamic_lookup")
];
postFixup = ''
# Sanitize header paths to avoid runtime dependencies leaking in
# through `__FILE__`.
(
shopt -s globstar
for header in "$out/include"/**/*.h; do
sed -i "1i#line 1 \"$header\"" "$header"
remove-references-to -t "$out" "$header"
done
)
'';
passthru.updateScript = nix-update-script { };
meta = {