···2929 ];
30303131 postInstall = ''
3232- for i in "$out/bin/"*; do
3333- wrapProgram "$i" --prefix PATH : "${groff}/bin"
3232+ # apropos/whatis uses program name to decide whether to act like apropos or whatis
3333+ # (multi-call binary). `apropos` is actually just a symlink to whatis. So we need to
3434+ # make sure that we don't wrap symlinks (since that changes argv[0] to the -wrapped name)
3535+ find "$out/bin" -type f | while read file; do
3636+ wrapProgram "$file" --prefix PATH : "${groff}/bin"
3437 done
3538 '';
3639