From patchwork Mon Jul 4 05:05:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Paul A. Patience" X-Patchwork-Id: 40507 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 1CAC827BBEA; Mon, 4 Jul 2022 06:06:14 +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 C4D7127BBE9 for ; Mon, 4 Jul 2022 06:06:13 +0100 (BST) Received: from localhost ([::1]:50848 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o8EHk-0000Id-W4 for patchwork@mira.cbaines.net; Mon, 04 Jul 2022 01:06:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53434) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o8EHd-0000IV-BT for guix-patches@gnu.org; Mon, 04 Jul 2022 01:06:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:51949) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o8EHa-0008Ny-AE for guix-patches@gnu.org; Mon, 04 Jul 2022 01:06:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o8EHa-0004Y0-4r for guix-patches@gnu.org; Mon, 04 Jul 2022 01:06:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#56378] [PATCH v3] gnu: Add pw. References: <20220704040248.942540-1-paul@apatience.com> In-Reply-To: <20220704040248.942540-1-paul@apatience.com> Resent-From: "Paul A. Patience" Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 04 Jul 2022 05:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56378 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 56378@debbugs.gnu.org Cc: "Paul A. Patience" Received: via spool by 56378-submit@debbugs.gnu.org id=B56378.165691115017462 (code B ref 56378); Mon, 04 Jul 2022 05:06:02 +0000 Received: (at 56378) by debbugs.gnu.org; 4 Jul 2022 05:05:50 +0000 Received: from localhost ([127.0.0.1]:45846 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o8EHN-0004Xa-MK for submit@debbugs.gnu.org; Mon, 04 Jul 2022 01:05:50 -0400 Received: from mail-40136.proton.ch ([185.70.40.136]:46627) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o8EHM-0004XM-9t for 56378@debbugs.gnu.org; Mon, 04 Jul 2022 01:05:48 -0400 Date: Mon, 04 Jul 2022 05:05:37 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=apatience.com; s=protonmail2; t=1656911142; x=1657170342; bh=Lknb43NxHQOVBrgV2TH/lb/u9I+vTkhSTotcqEHTWmc=; h=Date:To:From:Cc:Reply-To:Subject:Message-ID:Feedback-ID:From:To: Cc:Date:Subject:Reply-To:Feedback-ID:Message-ID; b=dK20sLfi2HmiD3HpjjsIQmbS1BeJy5t+QuAfEAnkbmVh5GRM0pKy+pE6w+RtXoZVk 56vytBWB0/5btO22YOkeIOn0kFiuhINgwMNbze6CCsemb998+WVPd3VDfYNXTjJVsx lc3UvFykEaGqiBajTs8/v4WtOSpqiH0EaAmjzmIdI8PG6qTmAJ4B5LoBTcRWpDjS93 tgEA6gVDWzn1RWdDfKUjSV/cN958rrVItIvLdxrjSdSBqaV6WHUSzgYpTPXTUYMO14 LB3bld7dw5I2ThhTvIdn7vw9eos5Mpyr0CqhDsSlmk0Q2JGz0ZjcZDnRyNXR52ljc9 SbzJY+hSMjmjw== From: "Paul A. Patience" Message-ID: <20220704050532.975427-1-paul@apatience.com> Feedback-ID: 19227857:user:proton MIME-Version: 1.0 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. --- Added copyright header. gnu/packages/monitoring.scm | 61 +++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) -- 2.36.1 diff --git a/gnu/packages/monitoring.scm b/gnu/packages/monitoring.scm index 1544efb614..1694f94b98 100644 --- a/gnu/packages/monitoring.scm +++ b/gnu/packages/monitoring.scm @@ -10,6 +10,7 @@ ;;; Copyright © 2021, 2022 Marius Bakke ;;; Copyright © 2021 Stefan Reichör ;;; Copyright © 2021 Raphaël Mélotte +;;; Copyright © 2022 Paul A. Patience ;;; ;;; This file is part of GNU Guix. ;;; @@ -682,3 +683,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/git/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)))