From ea14a143572cc98f54ffa2a31510a2ce52f102ac Mon Sep 17 00:00:00 2001 From: Benno Fünfstück Date: Fri, 30 Dec 2016 16:54:41 +0100 Subject: 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. --- pkgs/tools/misc/man-db/default.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/misc/man-db/default.nix b/pkgs/tools/misc/man-db/default.nix index 9c1dabc75844..8685b89d6d08 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 ''; -- cgit 1.4.1