summary refs log tree commit diff
path: root/pkgs/tools/misc/man-db
diff options
context:
space:
mode:
authorProfpatsch <mail@profpatsch.de>2016-10-07 12:38:02 +0200
committerFranz Pletz <fpletz@fnordicwalking.de>2016-10-11 18:34:36 +0200
commitfa5d919ae921d4b8bd796c9f97e0c85f16df92f6 (patch)
tree191888a3447263e891d290c8968ed0f36962805e /pkgs/tools/misc/man-db
parentbef6bef0d2ce2ef7cfaa3e9f1eac2cdc793560c4 (diff)
downloadnixpkgs-fa5d919ae921d4b8bd796c9f97e0c85f16df92f6.tar
nixpkgs-fa5d919ae921d4b8bd796c9f97e0c85f16df92f6.tar.gz
nixpkgs-fa5d919ae921d4b8bd796c9f97e0c85f16df92f6.tar.bz2
nixpkgs-fa5d919ae921d4b8bd796c9f97e0c85f16df92f6.tar.lz
nixpkgs-fa5d919ae921d4b8bd796c9f97e0c85f16df92f6.tar.xz
nixpkgs-fa5d919ae921d4b8bd796c9f97e0c85f16df92f6.tar.zst
nixpkgs-fa5d919ae921d4b8bd796c9f97e0c85f16df92f6.zip
man-db: wrap groff instead of compiling in
Some manpages, e.g. `systemd.time` were broken in a way that they
were rendered from the beginning after part of the page, and then only
lasted for maybe a third of their length.

So we just add groff in the wrapper instead of the configure phase like
every other distribution seems to do, and that fixes it.
Patch by @Mic92.

Fixes #19323.
Diffstat (limited to 'pkgs/tools/misc/man-db')
-rw-r--r--pkgs/tools/misc/man-db/default.nix17
1 files changed, 8 insertions, 9 deletions
diff --git a/pkgs/tools/misc/man-db/default.nix b/pkgs/tools/misc/man-db/default.nix
index b049e0706e9..9c1dabc7584 100644
--- a/pkgs/tools/misc/man-db/default.nix
+++ b/pkgs/tools/misc/man-db/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, pkgconfig, libpipeline, db, groff }:
+{ stdenv, fetchurl, pkgconfig, libpipeline, db, groff, makeWrapper }:
 
 stdenv.mkDerivation rec {
   name = "man-db-2.7.5";
@@ -11,9 +11,8 @@ stdenv.mkDerivation rec {
   outputs = [ "out" "doc" ];
   outputMan = "out"; # users will want `man man` to work
 
-  nativeBuildInputs = [ pkgconfig ];
+  nativeBuildInputs = [ pkgconfig makeWrapper ];
   buildInputs = [ libpipeline db groff ];
-  troff="${groff}/bin/groff";
 
   postPatch = ''
     substituteInPlace src/man_db.conf.in \
@@ -27,14 +26,14 @@ stdenv.mkDerivation rec {
     # Don't try /etc/man_db.conf by default, so we avoid error messages.
     "--with-config-file=\${out}/etc/man_db.conf"
     "--with-systemdtmpfilesdir=\${out}/lib/tmpfiles.d"
-    "--with-eqn=${groff}/bin/eqn"
-    "--with-neqn=${groff}/bin/neqn"
-    "--with-nroff=${groff}/bin/nroff"
-    "--with-pic=${groff}/bin/pic"
-    "--with-refer=${groff}/bin/refer"
-    "--with-tbl=${groff}/bin/tbl"
   ];
 
+  postInstall = ''
+    for i in "$out/bin/"*; do
+      wrapProgram "$i" --prefix PATH : "${groff}/bin"
+    done
+  '';
+
   enableParallelBuilding = true;
 
   doCheck = true;