fbthrift: use sanitiseHeaderPathsHook
This commit is contained in:
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user