Commit | Line | Data |
---|---|---|
233e7676 LC |
1 | ;;; GNU Guix --- Functional package management for GNU |
2 | ;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org> | |
4e94744d | 3 | ;;; Copyright © 2019 Tobias Geerinckx-Rice <me@tobias.gr> |
7baa8c78 | 4 | ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> |
0e680920 | 5 | ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de> |
fe7777c1 | 6 | ;;; |
233e7676 | 7 | ;;; This file is part of GNU Guix. |
fe7777c1 | 8 | ;;; |
233e7676 | 9 | ;;; GNU Guix is free software; you can redistribute it and/or modify it |
fe7777c1 NK |
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. | |
13 | ;;; | |
233e7676 | 14 | ;;; GNU Guix is distributed in the hope that it will be useful, but |
fe7777c1 NK |
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. | |
18 | ;;; | |
19 | ;;; You should have received a copy of the GNU General Public License | |
233e7676 | 20 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. |
fe7777c1 | 21 | |
1ffa7090 | 22 | (define-module (gnu packages less) |
4a44e743 | 23 | #:use-module (guix licenses) |
7baa8c78 | 24 | #:use-module (gnu packages) |
1ffa7090 | 25 | #:use-module (gnu packages ncurses) |
0e680920 MR |
26 | #:use-module (gnu packages perl) |
27 | #:use-module (gnu packages file) | |
fe7777c1 NK |
28 | #:use-module (guix packages) |
29 | #:use-module (guix download) | |
0e680920 | 30 | #:use-module (guix git-download) |
fe7777c1 NK |
31 | #:use-module (guix build-system gnu)) |
32 | ||
33 | (define-public less | |
34 | (package | |
35 | (name "less") | |
6deab02c | 36 | (version "551") |
fe7777c1 NK |
37 | (source |
38 | (origin | |
4e94744d TGR |
39 | (method url-fetch) |
40 | (uri (list (string-append "mirror://gnu/less/less-" | |
41 | version ".tar.gz") | |
42 | (string-append "http://www.greenwoodsoftware.com/less/less-" | |
43 | version ".tar.gz"))) | |
7baa8c78 | 44 | (patches (search-patches "less-hurd-path-max.patch")) |
4e94744d | 45 | (sha256 |
6deab02c | 46 | (base32 "0ggyjl3yzn7c450zk1rixi9ls6asdhgqynhk34zsd0ckhmsm45pz")))) |
fe7777c1 NK |
47 | (build-system gnu-build-system) |
48 | (inputs `(("ncurses" ,ncurses))) | |
49 | (home-page "https://www.gnu.org/software/less/") | |
f50d2669 | 50 | (synopsis "Paginator for terminals") |
fe7777c1 | 51 | (description |
a22dc0c4 LC |
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 | |
56 | text editors.") | |
f50d2669 | 57 | (license gpl3+))) ; some files are under GPLv2+ |
0e680920 MR |
58 | |
59 | (define-public lesspipe | |
60 | (package | |
61 | (name "lesspipe") | |
62 | (version "1.84") | |
63 | (source (origin | |
64 | (method git-fetch) | |
65 | (uri (git-reference | |
b0e7b699 | 66 | (url "https://github.com/wofr06/lesspipe") |
0e680920 MR |
67 | (commit version))) |
68 | (file-name (git-file-name name version)) | |
69 | (sha256 | |
70 | (base32 | |
71 | "124ffhzrikr88ab14rk6753n8adxijpmg7q3zx7nmqc52wpkfd8q")))) | |
72 | (build-system gnu-build-system) | |
73 | (arguments | |
74 | '(#:tests? #f ; no tests | |
75 | #:phases (modify-phases %standard-phases | |
76 | (replace 'configure | |
77 | (lambda* (#:key outputs #:allow-other-keys) | |
78 | (let ((out (assoc-ref outputs "out"))) | |
79 | (delete-file "Makefile") ; force generating | |
80 | (invoke "./configure" | |
81 | (string-append "--prefix=" out) | |
82 | "--yes") | |
83 | #t)))))) | |
84 | (inputs | |
85 | `(("file" ,file) | |
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.") | |
97 | (license gpl2+))) |