summary refs log tree commit diff
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2012-03-06 10:14:00 +0000
committerEelco Dolstra <eelco.dolstra@logicblox.com>2012-03-06 10:14:00 +0000
commit17fe5f329af13cbeed61774e6eaded595d2d3560 (patch)
tree8e9b5a2f840a6925f63865b73a154d815cbf380c
parentb57e0d8829f08f66b1120f80de2cd3ac7c0c3042 (diff)
* man: 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.

svn path=/nixpkgs/branches/stdenv-updates/; revision=32812
-rw-r--r--pkgs/tools/misc/man/conf.patch14
-rw-r--r--pkgs/tools/misc/man/default.nix5
2 files changed, 19 insertions, 0 deletions
diff --git a/pkgs/tools/misc/man/conf.patch b/pkgs/tools/misc/man/conf.patch
new file mode 100644
index 0000000000000..43e8642fb34a3
--- /dev/null
+++ b/pkgs/tools/misc/man/conf.patch
@@ -0,0 +1,14 @@
+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
index 0e4568c2cd3f3..12e888813fb95 100644
--- a/pkgs/tools/misc/man/default.nix
+++ b/pkgs/tools/misc/man/default.nix
@@ -17,6 +17,11 @@ stdenv.mkDerivation rec {
   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 = ''