lol

* A more pure man implementation.

svn path=/nixpkgs/trunk/; revision=10547

+147 -1
+26
pkgs/tools/misc/man/default.nix
··· 1 + {stdenv, fetchurl, groff, less}: 2 + 3 + stdenv.mkDerivation { 4 + name = "man-1.6f"; 5 + 6 + src = fetchurl { 7 + url = http://primates.ximian.com/~flucifredi/man/man-1.6f.tar.gz; 8 + sha256 = "0v2z6ywhy8kd2fa3ywkqayhjdivbaqn6qvhx93a1ldw135z8q84z"; 9 + }; 10 + 11 + buildInputs = [groff less]; 12 + 13 + preBuild = '' 14 + makeFlagsArray=(bindir=$out/bin sbindir=$out/sbin libdir=$out/lib mandir=$out/share/man) 15 + ''; 16 + 17 + patches = [ 18 + # Search in "share/man" relative to each path in $PATH (in addition to "man"). 19 + ./share.patch 20 + ]; 21 + 22 + meta = { 23 + homepage = http://primates.ximian.com/~flucifredi/man/; 24 + description = "Tool to read online Unix documentation"; 25 + }; 26 + }
+116
pkgs/tools/misc/man/share.patch
··· 1 + diff -rc man-1.6f-orig/src/manpath.c man-1.6f/src/manpath.c 2 + *** man-1.6f-orig/src/manpath.c 2006-08-03 23:18:33.000000000 +0200 3 + --- man-1.6f/src/manpath.c 2008-02-07 15:31:43.000000000 +0100 4 + *************** 5 + *** 109,121 **** 6 + * or ../man or ../man1 or ../man8 subdirectories. 7 + */ 8 + static char * 9 + ! find_man_subdir (char *p) { 10 + int len; 11 + char *t, *sp; 12 + 13 + len = strlen (p); 14 + 15 + ! t = my_malloc ((unsigned) len + 20); 16 + 17 + memcpy (t, p, len); 18 + strcpy (t + len, "/man"); 19 + --- 109,121 ---- 20 + * or ../man or ../man1 or ../man8 subdirectories. 21 + */ 22 + static char * 23 + ! find_man_subdir (char *p, char * maybe_share) { 24 + int len; 25 + char *t, *sp; 26 + 27 + len = strlen (p); 28 + 29 + ! t = my_malloc ((unsigned) len + 30); 30 + 31 + memcpy (t, p, len); 32 + strcpy (t + len, "/man"); 33 + *************** 34 + *** 139,159 **** 35 + } 36 + 37 + /* look for the situation with packagedir/bin and packagedir/man */ 38 + ! strcpy (t + len, "/man"); 39 + 40 + if (is_directory (t) == 1) 41 + return t; 42 + 43 + /* look for the situation with pkg/bin and pkg/man1 or pkg/man8 */ 44 + /* (looking for all man[1-9] would probably be a waste of stats) */ 45 + ! strcpy (t + len, "/man1"); 46 + 47 + if (is_directory (t) == 1) { 48 + t[len] = 0; 49 + return t; 50 + } 51 + 52 + ! strcpy (t + len, "/man8"); 53 + 54 + if (is_directory (t) == 1) { 55 + t[len] = 0; 56 + --- 139,159 ---- 57 + } 58 + 59 + /* look for the situation with packagedir/bin and packagedir/man */ 60 + ! sprintf (t + len, "%s/man", maybe_share); 61 + 62 + if (is_directory (t) == 1) 63 + return t; 64 + 65 + /* look for the situation with pkg/bin and pkg/man1 or pkg/man8 */ 66 + /* (looking for all man[1-9] would probably be a waste of stats) */ 67 + ! sprintf (t + len, "%s/man1", maybe_share); 68 + 69 + if (is_directory (t) == 1) { 70 + t[len] = 0; 71 + return t; 72 + } 73 + 74 + ! sprintf (t + len, "%s/man8", maybe_share); 75 + 76 + if (is_directory (t) == 1) { 77 + t[len] = 0; 78 + *************** 79 + *** 341,347 **** 80 + if (debug) 81 + gripe (IS_NOT_IN_CONFIG); 82 + 83 + ! t = find_man_subdir (dir); 84 + if (t != NULL) { 85 + if (debug) 86 + gripe (MAN_NEARBY); 87 + --- 341,347 ---- 88 + if (debug) 89 + gripe (IS_NOT_IN_CONFIG); 90 + 91 + ! t = find_man_subdir (dir, ""); 92 + if (t != NULL) { 93 + if (debug) 94 + gripe (MAN_NEARBY); 95 + *************** 96 + *** 352,357 **** 97 + --- 352,370 ---- 98 + if (debug) 99 + gripe (NO_MAN_NEARBY); 100 + } 101 + + 102 + + t = find_man_subdir (dir, "/share"); 103 + + if (t != NULL) { 104 + + if (debug) 105 + + gripe (MAN_NEARBY); 106 + + 107 + + add_to_mandirlist (t, perrs); 108 + + free (t); 109 + + } else { 110 + + if (debug) 111 + + gripe (NO_MAN_NEARBY); 112 + + } 113 + + 114 + } 115 + } 116 +
+4
pkgs/top-level/all-packages.nix
··· 627 627 inherit fetchurl stdenv; 628 628 }; 629 629 630 + man = import ../tools/misc/man { 631 + inherit fetchurl stdenv groff less; 632 + }; 633 + 630 634 man_db = import ../tools/misc/man-db { 631 635 inherit fetchurl stdenv db4 groff; 632 636 };
+1 -1
pkgs/top-level/build-for-release.nix
··· 102 102 libxslt 103 103 lvm2 104 104 lynx 105 - man_db 105 + man 106 106 mdadm 107 107 mesa 108 108 mingetty