From b5602ef7ecccc96468bddd7bdf3ac423e12dcb3a Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Thu, 21 Oct 2021 22:05:11 +0200 Subject: gnu: boxes: Update to 2.1.1. * gnu/packages/shellutils.scm (boxes): Update to 2.1.1. [arguments]: Adjust 'install phase. Don't explicitly return #t from phases. [native-inputs]: Add xxd. [inputs]: Add libunistring and pcre2. --- gnu/packages/shellutils.scm | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) (limited to 'gnu/packages/shellutils.scm') diff --git a/gnu/packages/shellutils.scm b/gnu/packages/shellutils.scm index 70236d9e5c2..25e0ae3c2d6 100644 --- a/gnu/packages/shellutils.scm +++ b/gnu/packages/shellutils.scm @@ -42,18 +42,21 @@ #:use-module (gnu packages bison) #:use-module (gnu packages flex) #:use-module (gnu packages golang) + #:use-module (gnu packages libunistring) #:use-module (gnu packages ncurses) + #:use-module (gnu packages pcre) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) #:use-module (gnu packages readline) #:use-module (gnu packages ruby) #:use-module (gnu packages shells) - #:use-module (gnu packages tmux)) + #:use-module (gnu packages tmux) + #:use-module (gnu packages vim)) (define-public boxes (package (name "boxes") - (version "1.3") + (version "2.1.1") (source (origin (method git-fetch) (uri (git-reference @@ -62,7 +65,7 @@ (file-name (git-file-name name version)) (sha256 (base32 - "0b12rsynrmkldlwcb62drk33kk0aqwbj10mq5y5x3hjf626gjwsi")))) + "1bf5rnfiw04ffs1l17zhbg4wvq2vfn2qbz1xmd250xqj15lysw88")))) (build-system gnu-build-system) (arguments `(#:test-target "test" @@ -78,11 +81,18 @@ (for-each (lambda (x) (install-file (car x) (string-append dest "/" (cdr x)))) - '(("src/boxes" . "bin") + '(("out/boxes" . "bin") ("doc/boxes.1" . "share/man/man1") - ("boxes-config" . "etc/"))) - #t)))))) - (native-inputs `(("flex" ,flex) ("bison" ,bison))) + ("boxes-config" . "etc/"))))))))) + (native-inputs + `(("bison" ,bison) + ("flex" ,flex) + + ;; For the tests. + ("xxd" ,xxd))) + (inputs + `(("libunistring" ,libunistring) + ("pcre2" ,pcre2))) (synopsis "Command line ASCII boxes") (description "This command-line filter program draws ASCII-art boxes around your input -- cgit v1.3 From ed0215d3f90ca7d55ed878563131a48adfd95195 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Thu, 21 Oct 2021 22:10:06 +0200 Subject: gnu: boxes: Link to homier home page. * gnu/packages/shellutils.scm (boxes)[home-page]: Link to the front page. --- gnu/packages/shellutils.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gnu/packages/shellutils.scm') diff --git a/gnu/packages/shellutils.scm b/gnu/packages/shellutils.scm index 25e0ae3c2d6..dd13d5dd139 100644 --- a/gnu/packages/shellutils.scm +++ b/gnu/packages/shellutils.scm @@ -93,11 +93,11 @@ (inputs `(("libunistring" ,libunistring) ("pcre2" ,pcre2))) + (home-page "https://boxes.thomasjensen.com") (synopsis "Command line ASCII boxes") (description "This command-line filter program draws ASCII-art boxes around your input text.") - (home-page "https://boxes.thomasjensen.com/build.html") (license license:gpl2))) (define-public zsh-autosuggestions -- cgit v1.3 From 980146637ceed18e1d72900ea95bc61a8367d7fa Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Thu, 21 Oct 2021 22:18:38 +0200 Subject: gnu: boxes: Match over CAR/CDR. * gnu/packages/shellutils.scm (boxes)[arguments]: Import (ice-9 match) and use it to replace the 'install phases's CAR & CDR usage. --- gnu/packages/shellutils.scm | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'gnu/packages/shellutils.scm') diff --git a/gnu/packages/shellutils.scm b/gnu/packages/shellutils.scm index dd13d5dd139..3ded0ee897e 100644 --- a/gnu/packages/shellutils.scm +++ b/gnu/packages/shellutils.scm @@ -72,18 +72,22 @@ #:make-flags (list (string-append "GLOBALCONF=" (assoc-ref %outputs "out") "/etc/boxes-config")) + #:modules + ((ice-9 match) + ,@%gnu-build-system-modules) #:phases (modify-phases %standard-phases (delete 'configure) (replace 'install (lambda* (#:key outputs #:allow-other-keys) - (let ((dest (assoc-ref outputs "out"))) - (for-each (lambda (x) - (install-file (car x) - (string-append dest "/" (cdr x)))) - '(("out/boxes" . "bin") - ("doc/boxes.1" . "share/man/man1") - ("boxes-config" . "etc/"))))))))) + (let ((out (assoc-ref outputs "out"))) + (for-each (match-lambda + ((source target) + (install-file source + (string-append out "/" target)))) + '(("out/boxes" "bin/") + ("doc/boxes.1" "share/man/man1/") + ("boxes-config" "etc/"))))))))) (native-inputs `(("bison" ,bison) ("flex" ,flex) -- cgit v1.3 From bcce83c7857d226a053a8563fc4e326a47fca473 Mon Sep 17 00:00:00 2001 From: Foo Chuan Wei Date: Fri, 29 Oct 2021 06:53:28 +0000 Subject: gnu: Add Random Identity Generator (rig) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/shellutils.scm (rig): New variable. Signed-off-by: Ludovic Courtès --- gnu/packages/shellutils.scm | 49 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) (limited to 'gnu/packages/shellutils.scm') diff --git a/gnu/packages/shellutils.scm b/gnu/packages/shellutils.scm index 3ded0ee897e..6e64cee1da0 100644 --- a/gnu/packages/shellutils.scm +++ b/gnu/packages/shellutils.scm @@ -12,6 +12,7 @@ ;;; Copyright © 2021 Brice Waegeneire ;;; Copyright © 2021 Alexandr Vityazev ;;; Copyright © 2021 Xinglu Chen +;;; Copyright © 2021 Foo Chuan Wei ;;; ;;; This file is part of GNU Guix. ;;; @@ -463,3 +464,51 @@ the UNIX philosophy, these commands are designed to be composed via pipes. A large collection of functions such as basename, replace, contains or is_dir are provided as arguments to these commands.") (license license:expat))) + +(define-public rig + (package + (name "rig") + (version "1.11") + (source (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/rig/rig/" + version "/rig-" + version ".tar.gz")) + (sha256 + (base32 + "1f3snysjqqlpk2kgvm5p2icrj4lsdymccmn3igkc2f60smqckgq0")))) + (build-system gnu-build-system) + (arguments `(#:make-flags + (list (string-append "CXX=" ,(cxx-for-target)) + (string-append "PREFIX=" %output)) + #:phases + (modify-phases %standard-phases + (delete 'configure) + (add-after 'unpack 'fix-build + (lambda _ + (substitute* "rig.cc" + (("^#include ") + "#include ")) + (substitute* "Makefile" + (("g\\+\\+") + "${CXX} -O2") + (("install -g 0 -m 755 -o 0 -s rig \\$\\(BINDIR\\)") + "install -m 755 -d $(DESTDIR)$(BINDIR)\n\t\ +install -m 755 rig $(DESTDIR)$(BINDIR)/rig") + (("install -g 0 -m 644 -o 0 rig.6 \\$\\(MANDIR\\)/man6/rig.6") + "install -m 755 -d $(DESTDIR)$(MANDIR)/man6/\n\t\ +install -m 644 rig.6 $(DESTDIR)$(MANDIR)/man6/rig.6") + (("install -g 0 -m 755 -o 0 -d \\$\\(DATADIR\\)") + "install -m 755 -d $(DESTDIR)$(DATADIR)") + (("install -g 0 -m 644 -o 0 data/\\*.idx \\$\\(DATADIR\\)") + "install -m 644 data/*.idx $(DESTDIR)$(DATADIR)"))))) + #:tests? #f)) + (home-page "http://rig.sourceforge.net") + (synopsis "Random identity generator") + (description + "RIG (Random Identity Generator) generates random, yet real-looking, +personal data. It is useful if you need to feed a name to a Web site, BBS, or +real person, and are too lazy to think of one yourself. Also, if the Web +site/BBS/person you are giving the information to tries to cross-check the +city, state, zip, or area code, it will check out.") + (license license:gpl2+))) -- cgit v1.3