mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-11-06 10:16:44 +01:00
2def8e7499
Just use bash arrays directly. I.e. addHook preConfigure myPreConfigure is now preConfigureHooks+=(myPreConfigure)
17 lines
531 B
Bash
17 lines
531 B
Bash
# This setup hook calls patchelf to automatically remove unneeded
|
|
# directories from the RPATH of every library or executable in every
|
|
# output.
|
|
|
|
fixupOutputHooks+=('if [ -z "$dontPatchELF" ]; then patchELF "$prefix"; fi')
|
|
|
|
patchELF() {
|
|
header "patching ELF executables and libraries in $prefix"
|
|
if [ -e "$prefix" ]; then
|
|
find "$prefix" \( \
|
|
\( -type f -a -name "*.so*" \) -o \
|
|
\( -type f -a -perm +0100 \) \
|
|
\) -print -exec patchelf --shrink-rpath '{}' \;
|
|
fi
|
|
stopNest
|
|
}
|