mirror of
https://github.com/lopsided98/nix-ros-overlay.git
synced 2025-06-11 18:24:50 +03:00
buildEnv: Link libraries and executables from the opt directory
This commit is contained in:
parent
1e05a2eb88
commit
885f79c638
1 changed files with 9 additions and 0 deletions
|
@ -52,6 +52,15 @@ let
|
|||
|
||||
postBuild = postBuild + ''
|
||||
"${buildPackages.perl}/bin/perl" "${./setup-hook-builder.pl}"
|
||||
|
||||
# Some ROS programs keep libraries and binaries in /opt.
|
||||
if [ -d "$out/opt" ]; then
|
||||
declare -A optMv=([lib]=lib [lib64]=lib [bin]=bin)
|
||||
for dir in ''${!optMv[@]}; do
|
||||
mkdir -p "$out/''${optMv["$dir"]}"
|
||||
find -L "$out/opt" -mindepth 3 -maxdepth 3 -type f -executable -path "*/$dir/*" -not -name '.*' -exec ln -sf '{}' "$out/''${optMv["$dir"]}" \;
|
||||
done
|
||||
fi
|
||||
'' + optionalString wrapPrograms ''
|
||||
if [ -d "$out/bin" ]; then
|
||||
find -L "$out/bin" -executable -type f -xtype l -print0 | \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue