aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorHartmut Goebel <h.goebel@crazy-compilers.com>2021-12-19 19:50:47 +0100
committerHartmut Goebel <h.goebel@crazy-compilers.com>2022-01-24 23:16:58 +0100
commit483731c816ba1090937ed06b4847e5c4c27a97f2 (patch)
treea67dbe1f5f667a9f7be9e8ce3af4a309d86994b1 /gnu
parentecb3f1b96a5895999cd800187b2197a78b56760a (diff)
downloadguix-483731c816ba1090937ed06b4847e5c4c27a97f2.tar
guix-483731c816ba1090937ed06b4847e5c4c27a97f2.tar.gz
gnu: Add grc.
* gnu/packages/shellutils.scm (grc): New variable.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/shellutils.scm54
1 files changed, 54 insertions, 0 deletions
diff --git a/gnu/packages/shellutils.scm b/gnu/packages/shellutils.scm
index 9171acef99..3f9f8a27f4 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)
@@ -616,3 +617,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)))