Merge pull request #126557 from r-burns/autogen
[staging] autogen: fix patchelf invocation to remove generic build path from rpath
This commit is contained in:
commit
2d78d6e01b
@ -86,9 +86,9 @@ stdenv.mkDerivation rec {
|
||||
done
|
||||
|
||||
'' + lib.optionalString (!stdenv.hostPlatform.isDarwin) ''
|
||||
# remove /build/** from RPATHs
|
||||
# remove build directory (/build/**, or /tmp/nix-build-**) from RPATHs
|
||||
for f in "$bin"/bin/*; do
|
||||
local nrp="$(patchelf --print-rpath "$f" | sed -E 's@(:|^)/build/[^:]*:@\1@g')"
|
||||
local nrp="$(patchelf --print-rpath "$f" | sed -E 's@(:|^)'$NIX_BUILD_TOP'[^:]*:@\1@g')"
|
||||
patchelf --set-rpath "$nrp" "$f"
|
||||
done
|
||||
'';
|
||||
|
Loading…
Reference in New Issue
Block a user