mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-28 00:24:18 +00:00
4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
44 lines
1.4 KiB
Nix
44 lines
1.4 KiB
Nix
{ lib, stdenv, fetchFromGitHub, substituteAll, perl, file, ncurses }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "lesspipe";
|
|
version = "1.85";
|
|
|
|
buildInputs = [ perl ];
|
|
preConfigure = "patchShebangs .";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "wofr06";
|
|
repo = "lesspipe";
|
|
rev = version;
|
|
sha256 = "1v1jdkdq1phc93gdr6mjlk98gipxrkkq4bj8kks0kfdvjgdwkdaa";
|
|
};
|
|
|
|
patches = [
|
|
(substituteAll {
|
|
src = ./fix-paths.patch;
|
|
file = "${file}/bin/file";
|
|
tput = "${ncurses}/bin/tput";
|
|
})
|
|
];
|
|
|
|
meta = with 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.
|
|
'';
|
|
homepage = "https://github.com/wofr06/lesspipe";
|
|
platforms = platforms.all;
|
|
license = licenses.gpl2;
|
|
maintainers = [ maintainers.martijnvermaat ];
|
|
};
|
|
}
|