autogen: try fixing on darwin

and cause no rebuild elsewhere.
In commit 2988780 I forgot that patchelf makes no sense there.
This commit is contained in:
Vladimír Čunát 2020-06-14 09:11:14 +02:00
parent 0697ad33c0
commit e1b93806ba
No known key found for this signature in database
GPG Key ID: E747DF1F9575A3AA

View File

@ -62,6 +62,7 @@ stdenv.mkDerivation rec {
sed -e "s|$lib/lib|/no-such-autogen-lib-path|" -i $f
done
'' + stdenv.lib.optionalString (!stdenv.hostPlatform.isDarwin) ''
# remove /build/** from RPATHs
for f in "$bin"/bin/*; do
local nrp="$(patchelf --print-rpath "$f" | sed -E 's@(:|^)/build/[^:]*:@\1@g')"