diff options
author | Benno Fünfstück <benno.fuenfstueck@gmail.com> | 2016-12-30 16:54:41 +0100 |
---|---|---|
committer | Benno Fünfstück <benno.fuenfstueck@gmail.com> | 2016-12-30 16:58:06 +0100 |
commit | ea14a143572cc98f54ffa2a31510a2ce52f102ac (patch) | |
tree | e802e6ae94f988a50436ea5b13fa56f5dbb559e6 /pkgs/tools/misc/man-db | |
parent | 087c244c067a1bc881874bda8fd7b4dac2331fb3 (diff) |
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.
Diffstat (limited to 'pkgs/tools/misc/man-db')
-rw-r--r-- | pkgs/tools/misc/man-db/default.nix | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/pkgs/tools/misc/man-db/default.nix b/pkgs/tools/misc/man-db/default.nix index 9c1dabc758441..8685b89d6d08a 100644 --- a/pkgs/tools/misc/man-db/default.nix +++ b/pkgs/tools/misc/man-db/default.nix @@ -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 ''; |