git.iko.soy/typeable/nixpkgs
on master help sign in
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.

commitea14a143572cc98f54ffa2a31510a2ce52f102ac authorBenno Fünfstück <benno.fuenfstueck@gmail.com> dateFri 30 Dec 2016, 16:54 (10 years ago) parent087c244
1 file changed+5−2
pkgs/tools/misc/man-db/default.nix+5−2
pkgs/tools/misc/man-db/default.nix+5−2
@@ -29,8 +29,11 @@ stdenv.mkDerivation rec {
2929 ];
3030
3131 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"
3437 done
3538 '';
3639