git.iko.soy/typeable/nixpkgs
on master help sign in
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.

commitfa5d919ae921d4b8bd796c9f97e0c85f16df92f6 authorProfpatsch <mail@profpatsch.de> dateFri 7 Oct 2016, 12:38 (10 years ago) parentbef6bef
1 file changed+8−9
pkgs/tools/misc/man-db/default.nix+8−9
pkgs/tools/misc/man-db/default.nix+8−9
@@ -1,4 +1,4 @@
1−{ stdenv, fetchurl, pkgconfig, libpipeline, db, groff }:
1+{ stdenv, fetchurl, pkgconfig, libpipeline, db, groff, makeWrapper }:
22
33stdenv.mkDerivation rec {
44 name = "man-db-2.7.5";
@@ -11,9 +11,8 @@ stdenv.mkDerivation rec {
1111 outputs = [ "out" "doc" ];
1212 outputMan = "out"; # users will want `man man` to work
1313
14− nativeBuildInputs = [ pkgconfig ];
14+ nativeBuildInputs = [ pkgconfig makeWrapper ];
1515 buildInputs = [ libpipeline db groff ];
16− troff="${groff}/bin/groff";
1716
1817 postPatch = ''
1918 substituteInPlace src/man_db.conf.in \
@@ -27,14 +26,14 @@ stdenv.mkDerivation rec {
2726 # Don't try /etc/man_db.conf by default, so we avoid error messages.
2827 "--with-config-file=\${out}/etc/man_db.conf"
2928 "--with-systemdtmpfilesdir=\${out}/lib/tmpfiles.d"
30− "--with-eqn=${groff}/bin/eqn"
31− "--with-neqn=${groff}/bin/neqn"
32− "--with-nroff=${groff}/bin/nroff"
33− "--with-pic=${groff}/bin/pic"
34− "--with-refer=${groff}/bin/refer"
35− "--with-tbl=${groff}/bin/tbl"
3629 ];
3730
31+ postInstall = ''
32+ for i in "$out/bin/"*; do
33+ wrapProgram "$i" --prefix PATH : "${groff}/bin"
34+ done
35+ '';
36+
3837 enableParallelBuilding = true;
3938
4039 doCheck = true;