nixpkgs/pkgs/development/ada-modules/gprbuild/gpr-project-darwin-rpath-hook.sh
Thomas Heijligen f2a142727c gnatPackages: Add scope for all ada packages
Ada depencencies musst be build with the same gnat version as the
project. Use a namespace as preperation to build with different gnat
versions.

gprbuild and gnatprove are still globaly visable.
2024-02-25 18:19:50 +01:00

11 lines
358 B
Bash

fixGprProjectDarwinRpath() {
for f in $(find $out -type f -executable); do
install_name_tool -id $f $f || true
for rpath in $(otool -L $f | grep @rpath | awk '{print $1}'); do
install_name_tool -change $rpath ${!outputLib}/lib/$(basename $rpath) $f || true
done
done
}
preFixupPhases+=" fixGprProjectDarwinRpath"