123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127 |
- (define-module (gnu packages less)
- #:use-module (guix gexp)
- #:use-module (guix licenses)
- #:use-module (gnu packages)
- #:use-module (gnu packages ncurses)
- #:use-module (gnu packages perl)
- #:use-module (gnu packages perl-compression)
- #:use-module (gnu packages file)
- #:use-module (guix packages)
- #:use-module (guix download)
- #:use-module (guix git-download)
- #:use-module (guix build-system gnu))
- (define-public less
- (package
- (name "less")
- (version "590")
- (source
- (origin
- (method url-fetch)
- (uri (list (string-append "mirror://gnu/less/less-"
- version ".tar.gz")
- (string-append "http://www.greenwoodsoftware.com/less/less-"
- version ".tar.gz")))
- (patches (search-patches "less-hurd-path-max.patch"))
- (sha256
- (base32 "044fl3izmsi8n1vqzsqdp65q0qyyn5kmsg4sk7id0mxzx15zbbba"))))
- (build-system gnu-build-system)
- (inputs (list ncurses))
- (home-page "https://www.gnu.org/software/less/")
- (synopsis "Paginator for terminals")
- (description
- "GNU less is a pager, a program that allows you to view large amounts
- of text in page-sized chunks. Unlike traditional pagers, it allows both
- backwards and forwards movement through the document. It also does not have
- to read the entire input file before starting, so it starts faster than most
- text editors.")
- (license gpl3+)))
- (define-public lesspipe
- (package
- (name "lesspipe")
- (version "2.04")
- (source (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/wofr06/lesspipe")
- (commit (string-append "v" version))))
- (file-name (git-file-name name version))
- (sha256
- (base32
- "1mwmwkmiyrpib18mli4wrh9n0i12cnf08ssrj6a0s6bgjcfxcjr2"))))
- (build-system gnu-build-system)
- (arguments
- (list
- #:tests? #f
- #:phases
- #~(modify-phases %standard-phases
- (replace 'configure
- (lambda* (#:key outputs #:allow-other-keys)
-
-
- (invoke "./configure"
- (string-append "--prefix=" (assoc-ref outputs "out")))))
- (add-before 'install 'fix-makefile
- (lambda _
- (substitute* "Makefile"
- (("\\$\\(DESTDIR\\)/etc") "$(DESTDIR)$(PREFIX)/etc"))))
- (add-before 'install 'patch-command-paths
-
-
-
-
-
- (lambda* (#:key inputs #:allow-other-keys)
- (let ((file (search-input-file inputs "/bin/file"))
- (tput (search-input-file inputs "/bin/tput")))
- (substitute* "sxw2txt"
- (("^use warnings;" line)
- (string-append
- line "\nuse lib '" #$(this-package-input "perl-archive-zip")
- "/lib/perl5/site_perl';")))
- (substitute* "lesscomplete"
- (("file -") (string-append file " -")))
- (substitute* "lesspipe.sh"
- (("tput colors")
- (string-append tput " colors"))
- (("file -")
- (string-append file " -")))))))))
- (inputs
- (list file
- ncurses
- perl-archive-zip))
- (native-inputs (list perl))
- (home-page "https://github.com/wofr06/lesspipe")
- (synopsis "Input filter for less")
- (description "To browse files, the excellent viewer @code{less} can be
- used. By setting the environment variable @code{LESSOPEN}, less can be
- enhanced by external filters to become more powerful. The input filter for
- less described here is called @code{lesspipe.sh}. It is able to process a
- wide variety of file formats. It enables users to inspect archives and
- display their contents without having to unpack them before. The filter is
- easily extensible for new formats.")
- (license gpl2+)))
|