diff options
author | Vladimír Čunát <vcunat@gmail.com> | 2017-07-05 09:30:47 +0200 |
---|---|---|
committer | Vladimír Čunát <vcunat@gmail.com> | 2017-07-05 09:30:47 +0200 |
commit | 7b7eb577a2220e6c745adbea0b0973c8a1b7d0a3 (patch) | |
tree | 7146cc8f82f05711a1e6b8396e1143dc6988bdbc | |
parent | febadbce3f5f5015f133d04e9476634c988a19b0 (diff) | |
parent | 111b5eb6377839b9518ea40fba6a71f121574ea1 (diff) | |
download | nixlib-7b7eb577a2220e6c745adbea0b0973c8a1b7d0a3.tar nixlib-7b7eb577a2220e6c745adbea0b0973c8a1b7d0a3.tar.gz nixlib-7b7eb577a2220e6c745adbea0b0973c8a1b7d0a3.tar.bz2 nixlib-7b7eb577a2220e6c745adbea0b0973c8a1b7d0a3.tar.lz nixlib-7b7eb577a2220e6c745adbea0b0973c8a1b7d0a3.tar.xz nixlib-7b7eb577a2220e6c745adbea0b0973c8a1b7d0a3.tar.zst nixlib-7b7eb577a2220e6c745adbea0b0973c8a1b7d0a3.zip |
Merge #27061: groff: fix man page coloring
-rw-r--r-- | pkgs/tools/text/groff/default.nix | 3 | ||||
-rw-r--r-- | pkgs/tools/text/groff/site.tmac | 16 |
2 files changed, 19 insertions, 0 deletions
diff --git a/pkgs/tools/text/groff/default.nix b/pkgs/tools/text/groff/default.nix index aa9ece8955b4..4e2f6af06694 100644 --- a/pkgs/tools/text/groff/default.nix +++ b/pkgs/tools/text/groff/default.nix @@ -59,6 +59,9 @@ stdenv.mkDerivation rec { postInstall = '' rm $doc/share/doc/groff/examples/hdtbl/*color*ps find $doc/share/doc/groff/ -type f -print0 | xargs -0 sed -i -e 's/%%CreationDate: .*//' + for f in 'man.local' 'mdoc.local'; do + cat '${./site.tmac}' >>"$out/share/groff/site-tmac/$f" + done ''; meta = with stdenv.lib; { diff --git a/pkgs/tools/text/groff/site.tmac b/pkgs/tools/text/groff/site.tmac new file mode 100644 index 000000000000..8ef1040ca4a0 --- /dev/null +++ b/pkgs/tools/text/groff/site.tmac @@ -0,0 +1,16 @@ +. +.if n \{\ +. \" Character translations for non-keyboard +. \" characters - to make them searchable +. if '\*[.T]'utf8' \{\ +. char \- \N'45' +. char - \N'45' +. char ' \N'39' +. char \' \N'39' +. \} +. +. \" Shut off SGR by default (groff colors) +. \" Require GROFF_SGR envvar defined to turn it on +. if '\V[GROFF_SGR]'' \ +. output x X tty: sgr 0 +.\} |