push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,245 @@
{
lib,
stdenv,
fetchFromGitHub,
makeWrapper,
perl,
procps,
bash,
# shell referenced dependencies
resholve,
binutils-unwrapped,
file,
gnugrep,
coreutils,
gnused,
gnutar,
iconv,
ncurses,
}:
stdenv.mkDerivation rec {
pname = "lesspipe";
version = "2.20";
src = fetchFromGitHub {
owner = "wofr06";
repo = "lesspipe";
rev = "v${version}";
hash = "sha256-yb3IzdaMiv1PwqHOfSyHvmWXyStvK/XXC49saXVAJFU=";
};
nativeBuildInputs = [
perl
makeWrapper
];
buildInputs = [
perl
bash
];
strictDeps = true;
postPatch = ''
patchShebangs --build configure
substituteInPlace configure --replace '/etc/bash_completion.d' '/share/bash-completion/completions'
'';
configureFlags = [
"--shell=${bash}/bin/bash"
"--prefix=/"
];
configurePlatforms = [ ];
dontBuild = true;
installFlags = [ "DESTDIR=$(out)" ];
postInstall = ''
# resholve doesn't see strings in an array definition
substituteInPlace $out/bin/lesspipe.sh --replace 'nodash strings' "nodash ${binutils-unwrapped}/bin/strings"
${resholve.phraseSolution "lesspipe.sh" {
scripts = [ "bin/lesspipe.sh" ];
interpreter = "${bash}/bin/bash";
inputs = [
coreutils
file
gnugrep
gnused
gnutar
iconv
procps
ncurses
];
keep = [
"$prog"
"$c1"
"$c2"
"$c3"
"$c4"
"$c5"
"$cmd"
"$colorizer"
"$HOME"
];
fake = {
# script guards usage behind has_cmd test function, it's safe to leave these external and optional
external = [
"cpio"
"isoinfo"
"cabextract"
"bsdtar"
"rpm2cpio"
"bsdtar"
"unzip"
"ar"
"unrar"
"rar"
"7zr"
"7za"
"isoinfo"
"gzip"
"bzip2"
"lzip"
"lzma"
"xz"
"brotli"
"compress"
"zstd"
"lz4"
"archive_color"
"bat"
"batcat"
"pygmentize"
"source-highlight"
"vimcolor"
"code2color"
"w3m"
"lynx"
"elinks"
"html2text"
"xmq"
"dtc"
"pdftotext"
"pdftohtml"
"pdfinfo"
"ps2ascii"
"procyon"
"ccze"
"mdcat"
"pandoc"
"docx2txt"
"libreoffice"
"pptx2md"
"mdcat"
"xlscat"
"odt2txt"
"wvText"
"catdoc"
"broken_catppt"
"sxw2txt"
"groff"
"mandoc"
"unrtf"
"dvi2tty"
"pod2text"
"perldoc"
"h5dump"
"ncdump"
"matdump"
"djvutxt"
"openssl"
"gpg"
"plistutil"
"plutil"
"id3v2"
"csvlook"
"csvtable"
"jq"
"zlib-flate"
"lessfilter"
"snap"
"locale" # call site is guarded by || so it's safe to leave dynamic
];
builtin = [ "setopt" ];
};
execer = [
"cannot:${iconv}/bin/iconv"
"cannot:${file}/bin/file"
];
}}
${resholve.phraseSolution "lesscomplete" {
scripts = [ "bin/lesscomplete" ];
interpreter = "${bash}/bin/bash";
inputs = [
coreutils
file
gnugrep
gnused
gnutar
];
keep = [
"$prog"
"$c1"
"$c2"
"$c3"
"$c4"
"$c5"
"$cmd"
];
fake = {
# script guards usage behind has_cmd test function, it's safe to leave these external and optional
external = [
"cpio"
"isoinfo"
"cabextract"
"bsdtar"
"rpm2cpio"
"bsdtar"
"unzip"
"ar"
"unrar"
"rar"
"7zr"
"7za"
"isoinfo"
"gzip"
"bzip2"
"lzip"
"lzma"
"xz"
"brotli"
"compress"
"zstd"
"lz4"
];
builtin = [ "setopt" ];
};
execer = [
"cannot:${file}/bin/file"
];
}}
'';
meta = with lib; {
description = "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.
'';
mainProgram = "lesspipe.sh";
homepage = "https://github.com/wofr06/lesspipe";
platforms = platforms.all;
license = licenses.gpl2Only;
maintainers = [ maintainers.martijnvermaat ];
};
}