From patchwork Sat Jan 1 22:38:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hartmut Goebel X-Patchwork-Id: 35866 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 2F77927BBEA; Sat, 1 Jan 2022 22:39:16 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,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 AE0D927BBE9 for ; Sat, 1 Jan 2022 22:39:15 +0000 (GMT) Received: from localhost ([::1]:38806 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n3n1u-0005k5-Na for patchwork@mira.cbaines.net; Sat, 01 Jan 2022 17:39:14 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33950) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n3n1j-0005jv-5B for guix-patches@gnu.org; Sat, 01 Jan 2022 17:39:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:47984) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n3n1i-0001iW-MO for guix-patches@gnu.org; Sat, 01 Jan 2022 17:39:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n3n1i-0000lz-Fe for guix-patches@gnu.org; Sat, 01 Jan 2022 17:39:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#52939] [PATCH] gnu: Add grc. Resent-From: Hartmut Goebel Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 01 Jan 2022 22:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 52939 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 52939@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16410767182918 (code B ref -1); Sat, 01 Jan 2022 22:39:02 +0000 Received: (at submit) by debbugs.gnu.org; 1 Jan 2022 22:38:38 +0000 Received: from localhost ([127.0.0.1]:59530 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n3n1J-0000kz-KL for submit@debbugs.gnu.org; Sat, 01 Jan 2022 17:38:37 -0500 Received: from lists.gnu.org ([209.51.188.17]:40464) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n3n1I-0000kq-8M for submit@debbugs.gnu.org; Sat, 01 Jan 2022 17:38:36 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33900) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n3n1I-0005i2-29 for guix-patches@gnu.org; Sat, 01 Jan 2022 17:38:36 -0500 Received: from mout.kundenserver.de ([212.227.126.134]:40697) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n3n1F-0001Nn-Ro for guix-patches@gnu.org; Sat, 01 Jan 2022 17:38:35 -0500 Received: from hermia.goebel-consult.de ([46.87.137.33]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.167]) with ESMTPSA (Nemesis) id 1M9Ib1-1n1I360HBf-006KuB for ; Sat, 01 Jan 2022 23:38:31 +0100 Received: from thisbe.fritz.box (thisbe.fritz.box [192.168.110.24]) by hermia.goebel-consult.de (Postfix) with ESMTP id 302CD6316E; Sat, 1 Jan 2022 23:38:40 +0100 (CET) From: Hartmut Goebel Date: Sat, 1 Jan 2022 23:38:27 +0100 Message-Id: <123c6bfc52dbc71f24dd85941c94ea074bcb1702.1641076627.git.h.goebel@crazy-compilers.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-Provags-ID: V03:K1:pMzti+lKnOQRIuaFI1kprPxv3qOL8+9isKd+Jv7cVGPwoqxgyhA nHpoQv5oFDHKvly/EyPGQ3Y5COvTzbWLfxeFyHYJ2WXR/DSy2EjocdOsV/AfgBQ0OxxyJMP FUqZTWFnDvr8BErVT3WUiNG533nMRDCTt3g507Cdf0sE61ug86ca44b9mAU7uEccjTxUwnV ECpSIyjuw0dGEJiEHr4Mg== X-UI-Out-Filterresults: notjunk:1;V03:K0:nChbrhdkVZQ=:nqZaI6RtlVvp+6LA8VTEZO iHYWrF2veZgfrScQxVKY1gKuP1U47Whrye44GmiFuw8XzHgnS4/ji9nourd7yy5RvbJosvvv3 Q3RSE/DM73reBtCWM1NBBEEiZzJEHYovzlYikE751M0z+ISjvlH4LQsjPyOS16e+JOGtQhY8K lMRZr4LcvWJ3V/GbGJiZsO150Gm1lQnTv5cuLYFfwTuiQJ0THJ10QhoPzuzh/5axX+29kgGpH vneYV9v0gonicwPKEWU/8pajA/Qrk3OAb57gg38Z0gWbyTpkg9B49tBNJEbg3TpZO4oVnzWdK jMM3AhmzE+UGZ4DsWMvLpv+7+8VIW1YC2z455Uoaf2oU0MPZRoHAf0nEx22bTXqd3UQsJ/oRz 3FDsoX1vFDmtTbi9x9ncQWRXY9Ihrs8+PEFRXMHEpTq3kUmUEnn6O/K+4mfl0uso1RQAW/BMR c8/9jNpNhiRaBWmlcxYFbSMoimr1kySxsx/wXL7RC6hkxq7d7vfO1be5OzOQTIBh+Dx0+C8hj st7MobY4iEb7JpR/Rwzu3inBWR1rZ5K6pHbDsWbMe6XmqkOc3yyU4qGgMs27292GdUgOqncJT f7NRvMcA6D0nWIiZCy5aPJihadewJmoSeh/xhCI5a635SGrTzAcCsKRKk6UBT9IaVrjcSjJnl 038iUxHN64KgcqSD2fb0wyAdqvFb7Tx6q0FLP3efoc6e5m+fhCEAYTEKPRYqB/WFZ9u7ph8MF +RJroGYtvUBfHQDy Received-SPF: none client-ip=212.227.126.134; envelope-from=h.goebel@crazy-compilers.com; helo=mout.kundenserver.de X-Spam_score_int: 0 X-Spam_score: 0.0 X-Spam_bar: / X-Spam_report: (0.0 / 5.0 requ) RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=unavailable 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: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/shellutils.scm (grc): New variable. --- gnu/packages/shellutils.scm | 54 +++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/gnu/packages/shellutils.scm b/gnu/packages/shellutils.scm index 7a868f0789..f59b009f19 100644 --- a/gnu/packages/shellutils.scm +++ b/gnu/packages/shellutils.scm @@ -32,6 +32,7 @@ (define-module (gnu packages shellutils) #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix gexp) #:use-module (guix utils) #:use-module (guix packages) #:use-module (guix download) @@ -570,3 +571,56 @@ set of programs designed to make renaming of files faster and less cumbersome. The file renaming utilities consists of five programs: @command{qmv}, @command{qcp}, @command{imv}, @command{icp}, and @command{deurlname}.") (license license:gpl3+))) + +(define-public grc + (package + (name "grc") + (version "1.13") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/garabik/grc") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1h0h88h484a9796hai0wasi1xmjxxhpyxgixn6fgdyc5h69gv8nl")))) + (build-system gnu-build-system) + (inputs + (list python)) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (delete 'configure) + (replace 'build + (lambda _ + (substitute* "grc" + (("conffilenames = \\[.*\\]") + (string-append + "conffilenames = [" + "os.environ.get('GUIX_ENVIRONMENT', '" #$output "') " + "+ '/etc/grc.conf']"))) + (substitute* "grcat" + (("conffilepath \\+= \\['/usr/.*\\]") + (string-append + "conffilepath += [" + "os.environ.get('GUIX_ENVIRONMENT', '" #$output "') " + "+ '/share/grc/']"))))) ;; trailing slash! + (delete 'check) + (replace 'install + (lambda _ + (invoke "sh" "install.sh" #$output #$output)))))) + (home-page "http://kassiopeia.juls.savba.sk/~garabik/software/grc.html") + (synopsis "Generic colouriser for everything") + (description "@code{grc} can be used to colourise logfiles, output of +shell commands, arbitrary text, etc. Many shell commands are supported out of +the box. + +You might want to add these lines you your @code{~/.bashrc}: +@example +GRC_ALIASES=true +source ${GUIX_ENVIRONMENT:-$HOME/.guix-profile}/etc/profile.d/grc.sh +@end example +") + (license license:gpl2)))