1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2019 Tobias Geerinckx-Rice <me@tobias.gr>
4 ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
5 ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
7 ;;; This file is part of GNU Guix.
9 ;;; GNU Guix is free software; you can redistribute it and/or modify it
10 ;;; under the terms of the GNU General Public License as published by
11 ;;; the Free Software Foundation; either version 3 of the License, or (at
12 ;;; your option) any later version.
14 ;;; GNU Guix is distributed in the hope that it will be useful, but
15 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
16 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 ;;; GNU General Public License for more details.
19 ;;; You should have received a copy of the GNU General Public License
20 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
22 (define-module (gnu packages less)
23 #:use-module (guix licenses)
24 #:use-module (gnu packages)
25 #:use-module (gnu packages ncurses)
26 #:use-module (gnu packages perl)
27 #:use-module (gnu packages file)
28 #:use-module (guix packages)
29 #:use-module (guix download)
30 #:use-module (guix git-download)
31 #:use-module (guix build-system gnu))
40 (uri (list (string-append "mirror://gnu/less/less-"
42 (string-append "http://www.greenwoodsoftware.com/less/less-"
44 (patches (search-patches "less-hurd-path-max.patch"))
46 (base32 "0ggyjl3yzn7c450zk1rixi9ls6asdhgqynhk34zsd0ckhmsm45pz"))))
47 (build-system gnu-build-system)
48 (inputs `(("ncurses" ,ncurses)))
49 (home-page "https://www.gnu.org/software/less/")
50 (synopsis "Paginator for terminals")
52 "GNU less is a pager, a program that allows you to view large amounts
53 of text in page-sized chunks. Unlike traditional pagers, it allows both
54 backwards and forwards movement through the document. It also does not have
55 to read the entire input file before starting, so it starts faster than most
57 (license gpl3+))) ; some files are under GPLv2+
59 (define-public lesspipe
66 (url "https://github.com/wofr06/lesspipe.git")
68 (file-name (git-file-name name version))
71 "124ffhzrikr88ab14rk6753n8adxijpmg7q3zx7nmqc52wpkfd8q"))))
72 (build-system gnu-build-system)
74 '(#:tests? #f ; no tests
75 #:phases (modify-phases %standard-phases
77 (lambda* (#:key outputs #:allow-other-keys)
78 (let ((out (assoc-ref outputs "out")))
79 (delete-file "Makefile") ; force generating
81 (string-append "--prefix=" out)
86 ("ncurses" ,ncurses))) ; for tput
87 (native-inputs `(("perl" ,perl)))
88 (home-page "https://github.com/wofr06/lesspipe")
89 (synopsis "Input filter for less")
90 (description "To browse files, the excellent viewer @code{less} can be
91 used. By setting the environment variable @code{LESSOPEN}, less can be
92 enhanced by external filters to become more powerful. The input filter for
93 less described here is called @code{lesspipe.sh}. It is able to process a
94 wide variety of file formats. It enables users to inspect archives and
95 display their contents without having to unpack them before. The filter is
96 easily extensible for new formats.")