edencommon: use sanitiseHeaderPathsHook
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
|
||||
cmake,
|
||||
ninja,
|
||||
removeReferencesTo,
|
||||
sanitiseHeaderPathsHook,
|
||||
|
||||
glog,
|
||||
gflags,
|
||||
@@ -47,7 +47,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
ninja
|
||||
removeReferencesTo
|
||||
sanitiseHeaderPathsHook
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
@@ -98,18 +98,6 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
'find_package(FBThrift CONFIG REQUIRED COMPONENTS cpp2)'
|
||||
'';
|
||||
|
||||
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 = {
|
||||
|
||||
Reference in New Issue
Block a user