man-db: make apropos search and not just behave like whatis

Before this fix, apropos behaved exactly like whatis and looked for
an exact match. Now, it actually provides the apropos-functionality
of searching.

+5 -2
+5 -2
pkgs/tools/misc/man-db/default.nix
··· 29 29 ]; 30 30 31 31 postInstall = '' 32 - for i in "$out/bin/"*; do 33 - wrapProgram "$i" --prefix PATH : "${groff}/bin" 32 + # apropos/whatis uses program name to decide whether to act like apropos or whatis 33 + # (multi-call binary). `apropos` is actually just a symlink to whatis. So we need to 34 + # make sure that we don't wrap symlinks (since that changes argv[0] to the -wrapped name) 35 + find "$out/bin" -type f | while read file; do 36 + wrapProgram "$file" --prefix PATH : "${groff}/bin" 34 37 done 35 38 ''; 36 39