Merge pull request #15646 from vcunat/p/man-db
man-db: make it the default man provider
This commit is contained in:
commit
4d0a421f18
@ -19,7 +19,7 @@ with lib;
|
|||||||
|
|
||||||
config = mkIf config.programs.man.enable {
|
config = mkIf config.programs.man.enable {
|
||||||
|
|
||||||
environment.systemPackages = [ pkgs.man ];
|
environment.systemPackages = [ pkgs.man-db ];
|
||||||
|
|
||||||
environment.pathsToLink = [ "/share/man" ];
|
environment.pathsToLink = [ "/share/man" ];
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ stdenv, fetchurl, ncurses, nettools, python, which, groff, gettext, man_db,
|
{ stdenv, fetchurl, ncurses, nettools, python, which, groff, gettext, man-db,
|
||||||
bc, libiconv, coreutils, gnused, kbd, utillinux, glibc }:
|
bc, libiconv, coreutils, gnused, kbd, utillinux, glibc }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
|
|||||||
# Required binaries during execution
|
# Required binaries during execution
|
||||||
# Python: Autocompletion generated from manpages and config editing
|
# Python: Autocompletion generated from manpages and config editing
|
||||||
propagatedBuildInputs = [ python which groff gettext ]
|
propagatedBuildInputs = [ python which groff gettext ]
|
||||||
++ stdenv.lib.optional (!stdenv.isDarwin) man_db
|
++ stdenv.lib.optional (!stdenv.isDarwin) man-db
|
||||||
++ [ bc coreutils ];
|
++ [ bc coreutils ];
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
@ -55,8 +55,8 @@ stdenv.mkDerivation rec {
|
|||||||
done
|
done
|
||||||
'' + stdenv.lib.optionalString (!stdenv.isDarwin) ''
|
'' + stdenv.lib.optionalString (!stdenv.isDarwin) ''
|
||||||
sed -i "s|(hostname\||(${nettools}/bin/hostname\||" "$out/share/fish/functions/fish_prompt.fish"
|
sed -i "s|(hostname\||(${nettools}/bin/hostname\||" "$out/share/fish/functions/fish_prompt.fish"
|
||||||
sed -i "s|Popen(\['manpath'|Popen(\['${man_db}/bin/manpath'|" "$out/share/fish/tools/create_manpage_completions.py"
|
sed -i "s|Popen(\['manpath'|Popen(\['${man-db}/bin/manpath'|" "$out/share/fish/tools/create_manpage_completions.py"
|
||||||
sed -i "s|command manpath|command ${man_db}/bin/manpath|" "$out/share/fish/functions/man.fish"
|
sed -i "s|command manpath|command ${man-db}/bin/manpath|" "$out/share/fish/functions/man.fish"
|
||||||
'' + ''
|
'' + ''
|
||||||
sed -i "s|/sbin /usr/sbin||" \
|
sed -i "s|/sbin /usr/sbin||" \
|
||||||
"$out/share/fish/functions/__fish_complete_subcommand_root.fish"
|
"$out/share/fish/functions/__fish_complete_subcommand_root.fish"
|
||||||
|
@ -8,12 +8,17 @@ stdenv.mkDerivation rec {
|
|||||||
sha256 = "056a3il7agfazac12yggcg4gf412yq34k065im0cpfxbcw6xskaw";
|
sha256 = "056a3il7agfazac12yggcg4gf412yq34k065im0cpfxbcw6xskaw";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ pkgconfig libpipeline db groff ];
|
outputs = [ "out" "doc" ];
|
||||||
|
outputMan = "out"; # users will want `man man` to work
|
||||||
|
|
||||||
|
nativeBuildInputs = [ pkgconfig ];
|
||||||
|
buildInputs = [ libpipeline db groff ];
|
||||||
|
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
"--disable-setuid"
|
"--disable-setuid"
|
||||||
"--sysconfdir=/etc"
|
|
||||||
"--localstatedir=/var"
|
"--localstatedir=/var"
|
||||||
|
# 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-systemdtmpfilesdir=\${out}/lib/tmpfiles.d"
|
||||||
"--with-eqn=${groff}/bin/eqn"
|
"--with-eqn=${groff}/bin/eqn"
|
||||||
"--with-neqn=${groff}/bin/neqn"
|
"--with-neqn=${groff}/bin/neqn"
|
||||||
@ -23,15 +28,9 @@ stdenv.mkDerivation rec {
|
|||||||
"--with-tbl=${groff}/bin/tbl"
|
"--with-tbl=${groff}/bin/tbl"
|
||||||
];
|
];
|
||||||
|
|
||||||
installFlags = [ "DESTDIR=\${out}" ];
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
postInstall = ''
|
doCheck = true;
|
||||||
mv $out/$out/* $out
|
|
||||||
DIR=$out/$out
|
|
||||||
while rmdir $DIR 2>/dev/null; do
|
|
||||||
DIR="$(dirname "$DIR")"
|
|
||||||
done
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
homepage = "http://man-db.nongnu.org";
|
homepage = "http://man-db.nongnu.org";
|
||||||
|
@ -64,6 +64,8 @@ doNotDisplayTwice rec {
|
|||||||
lttngTools = lttng-tools; # added 2014-07-31
|
lttngTools = lttng-tools; # added 2014-07-31
|
||||||
lttngUst = lttng-ust; # added 2014-07-31
|
lttngUst = lttng-ust; # added 2014-07-31
|
||||||
manpages = man-pages; # added 2015-12-06
|
manpages = man-pages; # added 2015-12-06
|
||||||
|
man_db = man-db; # added 2016-05
|
||||||
|
man = man-db; # added 2016-05
|
||||||
midoriWrapper = midori; # added 2015-01
|
midoriWrapper = midori; # added 2015-01
|
||||||
mlt-qt5 = qt5.mlt; # added 2015-12-19
|
mlt-qt5 = qt5.mlt; # added 2015-12-19
|
||||||
module_init_tools = kmod; # added 2016-04-22
|
module_init_tools = kmod; # added 2016-04-22
|
||||||
|
@ -2380,9 +2380,9 @@ in
|
|||||||
|
|
||||||
makemkv = callPackage ../applications/video/makemkv { };
|
makemkv = callPackage ../applications/video/makemkv { };
|
||||||
|
|
||||||
man = callPackage ../tools/misc/man { };
|
man-old = callPackage ../tools/misc/man { };
|
||||||
|
|
||||||
man_db = callPackage ../tools/misc/man-db { };
|
man-db = callPackage ../tools/misc/man-db { };
|
||||||
|
|
||||||
mawk = callPackage ../tools/text/mawk { };
|
mawk = callPackage ../tools/text/mawk { };
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user