From patchwork Sun May 3 11:09:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Michael Rohleder X-Patchwork-Id: 21870 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 28C5427BBE4; Sun, 3 May 2020 12:10:09 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:470:142::17]) by mira.cbaines.net (Postfix) with ESMTP id 9BF4027BBE1 for ; Sun, 3 May 2020 12:10:08 +0100 (BST) Received: from localhost ([::1]:58790 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVCVc-0007xm-1j for patchwork@mira.cbaines.net; Sun, 03 May 2020 07:10:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44228) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jVCVW-0007xU-OD for guix-patches@gnu.org; Sun, 03 May 2020 07:10:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:43237) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jVCVW-0002EC-FH for guix-patches@gnu.org; Sun, 03 May 2020 07:10:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jVCVW-0000mq-5b for guix-patches@gnu.org; Sun, 03 May 2020 07:10:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#41047] [PATCH] gnu: Add lesspipe Resent-From: Michael Rohleder Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 03 May 2020 11:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 41047 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 41047@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.15885041712981 (code B ref -1); Sun, 03 May 2020 11:10:02 +0000 Received: (at submit) by debbugs.gnu.org; 3 May 2020 11:09:31 +0000 Received: from localhost ([127.0.0.1]:54783 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jVCV0-0000m1-R9 for submit@debbugs.gnu.org; Sun, 03 May 2020 07:09:31 -0400 Received: from lists.gnu.org ([209.51.188.17]:35672) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jVCUy-0000lt-DF for submit@debbugs.gnu.org; Sun, 03 May 2020 07:09:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44162) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jVCUy-0007s7-5X for guix-patches@gnu.org; Sun, 03 May 2020 07:09:28 -0400 Received: from wp224.webpack.hosteurope.de ([2a01:488:42:1000:50ed:84e7::]:55310) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jVCUw-0001Kc-Mq for guix-patches@gnu.org; Sun, 03 May 2020 07:09:27 -0400 Received: from www.rohleder.de ([37.61.204.227]); authenticated by wp224.webpack.hosteurope.de running ExIM with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) id 1jVCUs-0003C7-5y; Sun, 03 May 2020 13:09:22 +0200 Received: from [192.168.1.8] (helo=chuwi) by www.rohleder.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1jVCUr-0007R4-Jl for guix-patches@gnu.org; Sun, 03 May 2020 13:09:21 +0200 From: Michael Rohleder X-PGP-Fingerprint: 755E 2DE5 D0D5 85C5 2E78 2830 7C7A FFBE FEF2 CB25 X-PGP-Key: https://www.rohleder.de/~mike/pgpkey.asc Date: Sun, 03 May 2020 13:09:15 +0200 Message-ID: <87mu6p46n8.fsf@rohleder.de> MIME-Version: 1.0 X-bounce-key: webpack.hosteurope.de;mike@rohleder.de;1588504166;963b23d6; X-HE-SMSGID: 1jVCUs-0003C7-5y Received-SPF: permerror client-ip=2a01:488:42:1000:50ed:84e7::; envelope-from=mike@rohleder.de; helo=wp224.webpack.hosteurope.de X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/03 07:09:22 X-ACL-Warn: Detected OS = ??? X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, T_SPF_PERMERROR=0.01, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches At least debian and gentoo include their own version of lesspipe in the less package. Nor sure if we should do the same or include this package here. I use this since a week or so and it works well so far. I'm not very creative on creating descriptions. Please feel free to change it. ;) From 9ee7d976ffa6cd6d8375fac2df0f50940f9d4877 Mon Sep 17 00:00:00 2001 From: Michael Rohleder Date: Sun, 3 May 2020 12:31:43 +0200 Subject: [PATCH] gnu: Add lesspipe * gnu/packages/less.scm (lesspipe): New variable. --- gnu/packages/less.scm | 50 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/gnu/packages/less.scm b/gnu/packages/less.scm index 91c269a67e..92e20a3705 100644 --- a/gnu/packages/less.scm +++ b/gnu/packages/less.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2012 Nikita Karetnikov ;;; Copyright © 2019 Tobias Geerinckx-Rice +;;; Copyright © 2020 Michael Rohleder ;;; ;;; This file is part of GNU Guix. ;;; @@ -20,8 +21,11 @@ (define-module (gnu packages less) #:use-module (guix licenses) #:use-module (gnu packages ncurses) + #:use-module (gnu packages perl) + #: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 @@ -48,3 +52,49 @@ 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+))) ; some files are under GPLv2+ + +(define-public lesspipe + (package + (name "lesspipe") + (version "1.84") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/wofr06/lesspipe.git") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "124ffhzrikr88ab14rk6753n8adxijpmg7q3zx7nmqc52wpkfd8q")))) + (build-system gnu-build-system) + (arguments + '(#:tests? #f ; no tests + #:phases (modify-phases %standard-phases + (replace 'configure + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (delete-file "Makefile") ; force generating + (invoke "./configure" + (string-append "--prefix=" out) + "--yes") + #t)))))) + (inputs + `(("file" ,file) + ("ncurses" ,ncurses))) ; for tput + (native-inputs `(("perl" ,perl))) + (home-page "https://github.com/wofr06/lesspipe") + (synopsis "Input filter for less") + (description "To browse files under UNIX the excellent viewer less +can be used. By setting the environment variable LESSOPEN, less can be +enhanced by external filters to become even more powerful. Most Linux +distributions come already with a \"lesspipe.sh\" that covers the most +common situations. +The input filter for less described here is called +\"lesspipe.sh\". It is able to process a wide variety of file +formats. It enables users to deeply inspect archives and to display +the contents of files in archives without having to unpack them +before. That means file contents can be properly interpreted even if +the files are compressed and contained in a hierarchy of +archives (often found in RPM or DEB archives containing source +tarballs). The filter is easily extensible for new formats.") + (license gpl2))) -- 2.26.2