From 3928f69d0017d66f4676846b2bade1378f5ac560 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Sun, 19 Jun 2022 02:00:09 +0200 Subject: [PATCH] gnu: Add most. * gnu/packages/slang.scm (most): New public variable. --- gnu/packages/slang.scm | 48 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) diff --git a/gnu/packages/slang.scm b/gnu/packages/slang.scm index c8de04667f..90945dd7c3 100644 --- a/gnu/packages/slang.scm +++ b/gnu/packages/slang.scm @@ -2,7 +2,7 @@ ;;; Copyright © 2015 Ludovic Courtès ;;; Copyright © 2015 Mark H Weaver ;;; Copyright © 2015 Eric Bavier -;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice +;;; Copyright © 2018, 2019, 2022 Tobias Geerinckx-Rice ;;; ;;; This file is part of GNU Guix. ;;; @@ -22,6 +22,7 @@ (define-module (gnu packages slang) #:use-module (guix packages) #:use-module (guix download) + #:use-module (guix gexp) #:use-module (guix utils) #:use-module (guix build-system gnu) #:use-module ((guix licenses) #:prefix license:) @@ -87,6 +88,51 @@ interpreter, it may also be used in a stand-alone fashion through the use of slsh, which is part of the S-Lang distribution.") (license license:gpl2+))) +(define-public most + (package + (name "most") + (version "5.1.0") + (source + (origin + (method url-fetch) + (uri (string-append "http://www.jedsoft.org/releases/most/most-" + version ".tar.gz")) + (sha256 + (base32 "008537ns659pw2aag15imwjrxj73j26aqq90h285is6kz8gmv06v")) + (modules '((guix build utils))) + (snippet + #~(begin + (substitute* "src/Makefile.in" + (("/bin/cp") "cp")))))) + (build-system gnu-build-system) + (arguments + (list #:configure-flags + #~(list (string-append "--with-slang=" + #$(this-package-input "slang"))) + #:tests? #f ; no test suite + #:phases + #~(modify-phases %standard-phases + (add-before 'configure 'fix-configure-script + ;; Don't try to link to the long-obsolete (and gone) -ltermcap. + (lambda _ + (substitute* "configure" + (("(MISC_TERMINFO_DIRS)=.*" _ variable) + (format #f "~a=\"~a/share/terminfo\"\n" variable + #$(this-package-input "ncurses"))))))))) + (inputs + (list ncurses slang)) + (home-page "https://www.jedsoft.org/most/") + (synopsis + "@dfn{Pager} (terminal text viewer) with multiple windows and filters") + (description + "Most is a paging text viewer. It displays the contents of a file or the +output of a command on the terminal, one screenful at a time, and lets you +scroll up and down to (re)view the entire text. + +You can open multiple windows within @command{most} to view different files, or +to inspect different parts of the same file, at the same time.") + (license license:gpl2+))) + (define-public newt (package (name "newt")