1{ stdenv, fetchFromGitHub, perl }:
2
3stdenv.mkDerivation rec {
4 name = "lesspipe-${version}";
5 version = "1.82";
6
7 buildInputs = [ perl ];
8 preConfigure = "patchShebangs .";
9
10 src = fetchFromGitHub {
11 owner = "wofr06";
12 repo = "lesspipe";
13 rev = version;
14 sha256 = "0vb7bpap8vy003ha10hc7hxl17y47sgdnrjpihgqxkn8k0bfqbbq";
15 };
16
17 meta = with stdenv.lib; {
18 description = "A preprocessor for less";
19 longDescription = ''
20 Usually lesspipe.sh is called as an input filter to less. With the help
21 of that filter less will display the uncompressed contents of compressed
22 (gzip, bzip2, compress, rar, 7-zip, lzip, xz or lzma) files. For files
23 containing archives and directories, a table of contents will be
24 displayed (e.g tar, ar, rar, jar, rpm and deb formats). Other supported
25 formats include nroff, pdf, ps, dvi, shared library, MS word, OASIS
26 (e.g. Openoffice), NetCDF, html, mp3, jpg, png, iso images, MacOSX bom,
27 plist and archive formats, perl storable data and gpg encrypted files.
28 This does require additional helper programs being installed.
29 '';
30 homepage = https://github.com/wofr06/lesspipe;
31 platforms = platforms.all;
32 license = licenses.gpl2;
33 maintainers = [ maintainers.martijnvermaat ];
34 };
35}