wangle: use sanitiseHeaderPathsHook

This commit is contained in:
Emily 2025-06-20 11:19:46 +01:00
parent aa5b3270d1
commit efab895df7

View File

@ -6,7 +6,7 @@
cmake,
ninja,
removeReferencesTo,
sanitiseHeaderPathsHook,
folly,
fizz,
@ -44,7 +44,7 @@ stdenv.mkDerivation (finalAttrs: {
nativeBuildInputs = [
cmake
ninja
removeReferencesTo
sanitiseHeaderPathsHook
];
buildInputs = [
@ -109,18 +109,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
)
'';
passthru.updateScript = nix-update-script { };
meta = {