summary refs log tree commit diff
diff options
context:
space:
mode:
authorBenno Fünfstück <benno.fuenfstueck@gmail.com>2016-12-30 16:54:41 +0100
committerBenno Fünfstück <benno.fuenfstueck@gmail.com>2016-12-30 16:58:06 +0100
commitea14a143572cc98f54ffa2a31510a2ce52f102ac (patch)
treee802e6ae94f988a50436ea5b13fa56f5dbb559e6
parent087c244c067a1bc881874bda8fd7b4dac2331fb3 (diff)
downloadnixlib-ea14a143572cc98f54ffa2a31510a2ce52f102ac.tar
nixlib-ea14a143572cc98f54ffa2a31510a2ce52f102ac.tar.gz
nixlib-ea14a143572cc98f54ffa2a31510a2ce52f102ac.tar.bz2
nixlib-ea14a143572cc98f54ffa2a31510a2ce52f102ac.tar.lz
nixlib-ea14a143572cc98f54ffa2a31510a2ce52f102ac.tar.xz
nixlib-ea14a143572cc98f54ffa2a31510a2ce52f102ac.tar.zst
nixlib-ea14a143572cc98f54ffa2a31510a2ce52f102ac.zip
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.
-rw-r--r--pkgs/tools/misc/man-db/default.nix7
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 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
   '';