2021-10-18 13:47:55 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, substituteAll, perl, file, ncurses, bash }:
|
2016-05-09 14:59:26 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-07-08 22:05:01 +00:00
|
|
|
pname = "lesspipe";
|
2020-09-05 04:00:39 +00:00
|
|
|
version = "1.85";
|
2016-05-09 14:59:26 +00:00
|
|
|
|
2021-10-18 13:47:55 +00:00
|
|
|
nativeBuildInputs = [ perl ];
|
|
|
|
buildInputs = [ perl bash ];
|
|
|
|
strictDeps = true;
|
|
|
|
preConfigure = ''
|
|
|
|
patchShebangs --build configure
|
|
|
|
'';
|
|
|
|
configureFlags = [ "--shell=${bash}/bin/bash" "--yes" ];
|
|
|
|
configurePlatforms = [];
|
|
|
|
dontBuild = true;
|
2016-05-09 14:59:26 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "wofr06";
|
|
|
|
repo = "lesspipe";
|
|
|
|
rev = version;
|
2020-09-05 04:00:39 +00:00
|
|
|
sha256 = "1v1jdkdq1phc93gdr6mjlk98gipxrkkq4bj8kks0kfdvjgdwkdaa";
|
2016-05-09 14:59:26 +00:00
|
|
|
};
|
|
|
|
|
2018-07-24 05:23:17 +00:00
|
|
|
patches = [
|
|
|
|
(substituteAll {
|
|
|
|
src = ./fix-paths.patch;
|
|
|
|
file = "${file}/bin/file";
|
|
|
|
tput = "${ncurses}/bin/tput";
|
|
|
|
})
|
2021-10-18 13:47:55 +00:00
|
|
|
./override-shell-detection.patch
|
2018-07-24 05:23:17 +00:00
|
|
|
];
|
2018-07-23 18:32:39 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2016-05-09 14:59:26 +00:00
|
|
|
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 01:11:51 +00:00
|
|
|
homepage = "https://github.com/wofr06/lesspipe";
|
2016-05-09 14:59:26 +00:00
|
|
|
platforms = platforms.all;
|
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = [ maintainers.martijnvermaat ];
|
|
|
|
};
|
|
|
|
}
|