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.
This commit is contained in:
Benno Fünfstück 2016-12-30 16:54:41 +01:00
parent 087c244c06
commit ea14a14357

View File

@ -29,8 +29,11 @@ stdenv.mkDerivation rec {
];
postInstall = ''
for i in "$out/bin/"*; do
wrapProgram "$i" --prefix PATH : "${groff}/bin"
# apropos/whatis uses program name to decide whether to act like apropos or whatis
# (multi-call binary). `apropos` is actually just a symlink to whatis. So we need to
# make sure that we don't wrap symlinks (since that changes argv[0] to the -wrapped name)
find "$out/bin" -type f | while read file; do
wrapProgram "$file" --prefix PATH : "${groff}/bin"
done
'';