man-db: clean the expression a bit

This solves the errors
> can't open the manpath configuration file /etc/man_db.conf
which were common e.g. for fish users.

+12 -13
+12 -13
pkgs/tools/misc/man-db/default.nix
··· 1 1 { stdenv, fetchurl, pkgconfig, libpipeline, db, groff }: 2 - 2 + 3 3 stdenv.mkDerivation rec { 4 4 name = "man-db-2.7.5"; 5 - 5 + 6 6 src = fetchurl { 7 7 url = "mirror://savannah/man-db/${name}.tar.xz"; 8 8 sha256 = "056a3il7agfazac12yggcg4gf412yq34k065im0cpfxbcw6xskaw"; 9 9 }; 10 - 11 - buildInputs = [ pkgconfig libpipeline db groff ]; 10 + 11 + outputs = [ "out" "doc" ]; 12 + outputMan = "out"; # users will want `man man` to work 13 + 14 + nativeBuildInputs = [ pkgconfig ]; 15 + buildInputs = [ libpipeline db groff ]; 12 16 13 17 configureFlags = [ 14 18 "--disable-setuid" 15 - "--sysconfdir=/etc" 16 19 "--localstatedir=/var" 20 + # Don't try /etc/man_db.conf by default, so we avoid error messages. 21 + "--with-config-file=\${out}/etc/man_db.conf" 17 22 "--with-systemdtmpfilesdir=\${out}/lib/tmpfiles.d" 18 23 "--with-eqn=${groff}/bin/eqn" 19 24 "--with-neqn=${groff}/bin/neqn" ··· 23 28 "--with-tbl=${groff}/bin/tbl" 24 29 ]; 25 30 26 - installFlags = [ "DESTDIR=\${out}" ]; 31 + enableParallelBuilding = true; 27 32 28 - postInstall = '' 29 - mv $out/$out/* $out 30 - DIR=$out/$out 31 - while rmdir $DIR 2>/dev/null; do 32 - DIR="$(dirname "$DIR")" 33 - done 34 - ''; 33 + doCheck = true; 35 34 36 35 meta = with stdenv.lib; { 37 36 homepage = "http://man-db.nongnu.org";