boost: Don't store absolute path in #line

This causes packages to have boost.dev in their runtime closures, via
assertion messages.

Fixes #34462.
This commit is contained in:
Eelco Dolstra 2018-02-05 21:56:43 +01:00
parent b1273f2453
commit c08e4b9102
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE

View file

@ -144,7 +144,7 @@ stdenv.mkDerivation {
postFixup = ''
# Make boost header paths relative so that they are not runtime dependencies
find "$dev/include" \( -name '*.hpp' -or -name '*.h' -or -name '*.ipp' \) \
cd "$dev" && find include \( -name '*.hpp' -or -name '*.h' -or -name '*.ipp' \) \
-exec sed '1i#line 1 "{}"' -i '{}' \;
'' + optionalString (hostPlatform.libc == "msvcrt") ''
$RANLIB "$out/lib/"*.a