From patchwork Mon Jul 4 04:02:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Paul A. Patience" X-Patchwork-Id: 40499 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 D29AE27BBEA; Mon, 4 Jul 2022 05:04:19 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 84FF327BBE9 for ; Mon, 4 Jul 2022 05:04:19 +0100 (BST) Received: from localhost ([::1]:39736 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o8DJq-0006GR-IZ for patchwork@mira.cbaines.net; Mon, 04 Jul 2022 00:04:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47378) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o8DJb-0006G3-7d for guix-patches@gnu.org; Mon, 04 Jul 2022 00:04:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:51888) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o8DJa-000074-VN for guix-patches@gnu.org; Mon, 04 Jul 2022 00:04:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o8DJa-0002vH-Jj for guix-patches@gnu.org; Mon, 04 Jul 2022 00:04:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#56378] [PATCH] gnu: Add pw. Resent-From: "Paul A. Patience" Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 04 Jul 2022 04:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 56378 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 56378@debbugs.gnu.org Cc: "Paul A. Patience" X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.165690739811182 (code B ref -1); Mon, 04 Jul 2022 04:04:02 +0000 Received: (at submit) by debbugs.gnu.org; 4 Jul 2022 04:03:18 +0000 Received: from localhost ([127.0.0.1]:45785 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o8DIs-0002uI-Aq for submit@debbugs.gnu.org; Mon, 04 Jul 2022 00:03:18 -0400 Received: from lists.gnu.org ([209.51.188.17]:37416) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o8DIq-0002uB-Ts for submit@debbugs.gnu.org; Mon, 04 Jul 2022 00:03:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47112) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o8DIq-0006B3-Fe for guix-patches@gnu.org; Mon, 04 Jul 2022 00:03:16 -0400 Received: from mail-4317.proton.ch ([185.70.43.17]:11712) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o8DIm-0008Iv-DL for guix-patches@gnu.org; Mon, 04 Jul 2022 00:03:15 -0400 Date: Mon, 04 Jul 2022 04:02:57 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=apatience.com; s=protonmail2; t=1656907389; x=1657166589; bh=kVrDh5FXs/I/31/A8v2huxrRwkr/7rSJjU6h6N2chYQ=; h=Date:To:From:Cc:Reply-To:Subject:Message-ID:Feedback-ID:From:To: Cc:Date:Subject:Reply-To:Feedback-ID:Message-ID; b=S5jECCki7k94hu4E0TywctgrxBQQfGvppr051GatJXCwoRzYyVZEoqEWqv6BifaX7 OPQplLxa05wSmghBXmGOvFLOtMYG0g6hXnRncbKPMaHx4vFGV+ScdCIVWW0Mfheysk Xv8hOscP0cnyGz1eHZOGMneSo1Lg+ffrdLPBrRqyVNRu25tx42mjtGXgln0AWHTgvA mypKCbb+/yhZKjLtXvwsvAGJbxySetdHSI3xrDnO9dZ/4oR6ZCQqdihS+uu7lCl8YF yyvpw7bO/yd20TC8/HyZSAAHbTmyecVPUXvOXktXMk7lesExxPG5uwR/pPFYQCpK4e gIyXit2VRnjcQ== From: "Paul A. Patience" Message-ID: <20220704040248.942540-1-paul@apatience.com> Feedback-ID: 19227857:user:proton MIME-Version: 1.0 Received-SPF: pass client-ip=185.70.43.17; envelope-from=paul@apatience.com; helo=mail-4317.proton.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no 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: , Reply-To: "Paul A. Patience" Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/monitoring.scm (pw): New variable. --- gnu/packages/monitoring.scm | 60 +++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) -- 2.36.1 diff --git a/gnu/packages/monitoring.scm b/gnu/packages/monitoring.scm index 1544efb614..392ec732bf 100644 --- a/gnu/packages/monitoring.scm +++ b/gnu/packages/monitoring.scm @@ -682,3 +682,63 @@ (define-public fatrace power saving.") (home-page "https://github.com/martinpitt/fatrace") (license license:gpl3+))) + +(define-public pw + (package + (name "pw") + (version "2") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://www.kylheku.com/cgit/pw/") + (commit (string-append "pw-" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1xn3qnzz48xan78cp83hfrcifrxx9lgnm14134qhyr5wvj7dk246")))) + (build-system gnu-build-system) + (arguments + (list #:tests? #f ; There are no tests + #:make-flags + #~(list (string-append "CC=" #$(cc-for-target)) + (string-append "DESTDIR=" #$output)) + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'fix-makefile + (lambda _ + (substitute* "Makefile" + (("/share/man/man1 \\\\") "/share/man/man1; \\")))) + (delete 'configure) + (add-before 'install 'make-install-dirs + (lambda _ + (mkdir-p (string-append #$output "/bin")) + (mkdir-p (string-append #$output "/share/man/man1")) + (mkdir-p (string-append #$output "/share/man/man5"))))))) + (home-page "https://www.kylheku.com/cgit/pw/") + (synopsis "Monitor recent lines of output from pipe") + (description + "@command{pw} is Pipe Watch, a utility that continuously reads lines of +text from a pipe or pipe-like source, passes them through a FIFO buffer, and +maintains a display based on the occasional sampling of the contents of the +FIFO buffer, with useful features such as triggering and filtering. + +With @command{pw} you can: + +@itemize +@item Interactively apply and remove filters on-the-fly, without interrupting +the source. + +@item Make recurring patterns in the stream appear to ``freeze'' on the +screen, using triggers. + +@item Prevent the overwhelming amount of output from a program from flooding +the terminal, while consuming all of that output so that the program isn't +blocked. @command{pw} can pause its display updates entirely. + +@item Juggle multiple shell background jobs that produce output, yet execute +indefinitely without blocking. When @command{pw} runs as part of a shell +background job, it continues to consume input, process filters and take +snapshots, without displaying anything. When put into the foreground again, +display resumes. +@end itemize") + (license license:bsd-2)))