2018-07-24 07:23:17 +02:00
|
|
|
{ stdenv, fetchFromGitHub, substituteAll, perl, file, ncurses }:
|
2016-05-09 16:59:26 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-07-09 00:05:01 +02:00
|
|
|
pname = "lesspipe";
|
2019-08-04 20:01:28 +02:00
|
|
|
version = "1.84";
|
2016-05-09 16:59:26 +02:00
|
|
|
|
2018-07-24 07:23:17 +02:00
|
|
|
buildInputs = [ perl ];
|
2016-05-09 16:59:26 +02:00
|
|
|
preConfigure = "patchShebangs .";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "wofr06";
|
|
|
|
repo = "lesspipe";
|
|
|
|
rev = version;
|
2019-08-04 20:01:28 +02:00
|
|
|
sha256 = "124ffhzrikr88ab14rk6753n8adxijpmg7q3zx7nmqc52wpkfd8q";
|
2016-05-09 16:59:26 +02:00
|
|
|
};
|
|
|
|
|
2018-07-24 07:23:17 +02:00
|
|
|
patches = [
|
|
|
|
(substituteAll {
|
|
|
|
src = ./fix-paths.patch;
|
|
|
|
file = "${file}/bin/file";
|
|
|
|
tput = "${ncurses}/bin/tput";
|
|
|
|
})
|
|
|
|
];
|
2018-07-23 20:32:39 +02:00
|
|
|
|
2016-05-09 16:59:26 +02:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "A preprocessor for less";
|
|
|
|
longDescription = ''
|
|
|
|
Usually lesspipe.sh is called as an input filter to less. With the help
|
|
|
|
of that filter less will display the uncompressed contents of compressed
|
|
|
|
(gzip, bzip2, compress, rar, 7-zip, lzip, xz or lzma) files. For files
|
|
|
|
containing archives and directories, a table of contents will be
|
|
|
|
displayed (e.g tar, ar, rar, jar, rpm and deb formats). Other supported
|
|
|
|
formats include nroff, pdf, ps, dvi, shared library, MS word, OASIS
|
|
|
|
(e.g. Openoffice), NetCDF, html, mp3, jpg, png, iso images, MacOSX bom,
|
|
|
|
plist and archive formats, perl storable data and gpg encrypted files.
|
|
|
|
This does require additional helper programs being installed.
|
|
|
|
'';
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://github.com/wofr06/lesspipe";
|
2016-05-09 16:59:26 +02:00
|
|
|
platforms = platforms.all;
|
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = [ maintainers.martijnvermaat ];
|
|
|
|
};
|
|
|
|
}
|