@@ -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;