diff --git a/pkgs/tools/misc/man/conf.patch b/pkgs/tools/misc/man/conf.patch deleted file mode 100644 index 43e8642fb34..00000000000 --- a/pkgs/tools/misc/man/conf.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -ru -x '*~' man-1.6g-orig/src/man-config.c man-1.6g/src/man-config.c ---- man-1.6g-orig/src/man-config.c 2005-08-21 01:26:06.000000000 +0200 -+++ man-1.6g/src/man-config.c 2012-03-06 11:11:28.159050524 +0100 -@@ -214,8 +214,9 @@ - const char *configuration_file = "[no configuration file]"; - - char *default_config_files[] = { -+ "/etc/man.conf", - CONFIG_FILE, /* compiled-in default */ -- "/etc/man.conf", "/etc/man.config", -+ "/etc/man.config", - "/usr/lib/man.conf", "/usr/lib/man.config", - "/usr/share/misc/man.conf", "/usr/share/misc/man.config" - }; diff --git a/pkgs/tools/misc/man/default.nix b/pkgs/tools/misc/man/default.nix deleted file mode 100644 index 2f61a30714e..00000000000 --- a/pkgs/tools/misc/man/default.nix +++ /dev/null @@ -1,50 +0,0 @@ -{ stdenv, fetchurl, groff, less }: - -stdenv.mkDerivation rec { - name = "man-1.6g"; - - src = fetchurl { - url = "http://primates.ximian.com/~flucifredi/man/${name}.tar.gz"; - sha256 = "17wmp2ahkhl72cvfzshmck22dnq2lbjg0678swihj270yk1vip6c"; - }; - - buildInputs = [ groff less ]; - - preBuild = '' - makeFlagsArray=(bindir=$out/bin sbindir=$out/sbin libdir=$out/lib mandir=$out/share/man) - ''; - - patches = [ - # Search in "share/man" relative to each path in $PATH (in addition to "man"). - ./share.patch - - # Prefer /etc/man.conf over $out/lib/man.conf. Man only reads the - # first file that exists, so this is necessary to allow the - # builtin config to be overriden. - ./conf.patch - ]; - - preConfigure = '' - sed 's/^PREPATH=.*/PREPATH=$PATH/' -i configure - ''; - - postInstall = - '' - # Use UTF-8 by default. Otherwise man won't know how to deal - # with certain characters. - substituteInPlace $out/lib/man.conf \ - --replace "nroff -Tlatin1" "nroff" \ - --replace "eqn -Tlatin1" "eqn -Tutf8" - - # Work around a bug in substituteInPlace. It loses the final - # newline, and man requires every line in man.conf to be - # terminated by a newline. - echo >> $out/lib/man.conf - ''; - - meta = { - homepage = http://primates.ximian.com/~flucifredi/man/; - description = "Tool to read online Unix documentation"; - platforms = stdenv.lib.platforms.unix; - }; -} diff --git a/pkgs/tools/misc/man/share.patch b/pkgs/tools/misc/man/share.patch deleted file mode 100644 index 837786e28eb..00000000000 --- a/pkgs/tools/misc/man/share.patch +++ /dev/null @@ -1,116 +0,0 @@ -diff -rc man-1.6f-orig/src/manpath.c man-1.6f/src/manpath.c -*** man-1.6f-orig/src/manpath.c 2006-08-03 23:18:33.000000000 +0200 ---- man-1.6f/src/manpath.c 2008-02-07 15:31:43.000000000 +0100 -*************** -*** 109,121 **** - * or ../man or ../man1 or ../man8 subdirectories. - */ - static char * -! find_man_subdir (char *p) { - int len; - char *t, *sp; - - len = strlen (p); - -! t = my_malloc ((unsigned) len + 20); - - memcpy (t, p, len); - strcpy (t + len, "/man"); ---- 109,121 ---- - * or ../man or ../man1 or ../man8 subdirectories. - */ - static char * -! find_man_subdir (char *p, char * maybe_share) { - int len; - char *t, *sp; - - len = strlen (p); - -! t = my_malloc ((unsigned) len + 30); - - memcpy (t, p, len); - strcpy (t + len, "/man"); -*************** -*** 139,159 **** - } - - /* look for the situation with packagedir/bin and packagedir/man */ -! strcpy (t + len, "/man"); - - if (is_directory (t) == 1) - return t; - - /* look for the situation with pkg/bin and pkg/man1 or pkg/man8 */ - /* (looking for all man[1-9] would probably be a waste of stats) */ -! strcpy (t + len, "/man1"); - - if (is_directory (t) == 1) { - t[len] = 0; - return t; - } - -! strcpy (t + len, "/man8"); - - if (is_directory (t) == 1) { - t[len] = 0; ---- 139,159 ---- - } - - /* look for the situation with packagedir/bin and packagedir/man */ -! sprintf (t + len, "%s/man", maybe_share); - - if (is_directory (t) == 1) - return t; - - /* look for the situation with pkg/bin and pkg/man1 or pkg/man8 */ - /* (looking for all man[1-9] would probably be a waste of stats) */ -! sprintf (t + len, "%s/man1", maybe_share); - - if (is_directory (t) == 1) { - t[len] = 0; - return t; - } - -! sprintf (t + len, "%s/man8", maybe_share); - - if (is_directory (t) == 1) { - t[len] = 0; -*************** -*** 341,347 **** - if (debug) - gripe (IS_NOT_IN_CONFIG); - -! t = find_man_subdir (dir); - if (t != NULL) { - if (debug) - gripe (MAN_NEARBY); ---- 341,347 ---- - if (debug) - gripe (IS_NOT_IN_CONFIG); - -! t = find_man_subdir (dir, ""); - if (t != NULL) { - if (debug) - gripe (MAN_NEARBY); -*************** -*** 352,357 **** ---- 352,370 ---- - if (debug) - gripe (NO_MAN_NEARBY); - } -+ -+ t = find_man_subdir (dir, "/share"); -+ if (t != NULL) { -+ if (debug) -+ gripe (MAN_NEARBY); -+ -+ add_to_mandirlist (t, perrs); -+ free (t); -+ } else { -+ if (debug) -+ gripe (NO_MAN_NEARBY); -+ } -+ - } - } - diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8b082ccf7c9..c51a32cb17b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4581,12 +4581,7 @@ in makefile2graph = callPackage ../development/tools/analysis/makefile2graph { }; - # See https://github.com/NixOS/nixpkgs/issues/15849. I'm switching on isLinux because - # it looks like gnulib is broken on non-linux, so it seems likely that this would cause - # trouble on bsd and/or cygwin as well. - man = if stdenv.isLinux then man-db else man-old; - - man-old = callPackage ../tools/misc/man { }; + man = man-db; man-db = callPackage ../tools/misc/man-db { };