projects/guix·blob wip-postfix · refs

793 lines · 31.5 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2016 Matthew Jordan <[email protected]>
3;;; Copyright © 2016, 2017 Alex Griffin <[email protected]>
4;;; Copyright © 2016 Christopher Baines <[email protected]>
5;;; Copyright © 2017 Stefan Reichör <[email protected]>
6;;; Copyright © 2018, 2020 Tobias Geerinckx-Rice <[email protected]>
7;;; Copyright © 2018 Benjamin Slade <[email protected]>
8;;; Copyright © 2019 Collin J. Doering <[email protected]>
9;;; Copyright © 2020, 2022 Michael Rohleder <[email protected]>
10;;; Copyright © 2020 aecepoglu <[email protected]>
11;;; Copyright © 2020 Dion Mendel <[email protected]>
12;;; Copyright © 2021 Brice Waegeneire <[email protected]>
13;;; Copyright © 2021 Alexandr Vityazev <[email protected]>
14;;; Copyright © 2021 Xinglu Chen <[email protected]>
15;;; Copyright © 2021 Foo Chuan Wei <[email protected]>
16;;; Copyright © 2021 Wiktor Żelazny <[email protected]>
17;;; Copyright © 2022 Jose G Perez Taveras <[email protected]>
18;;; Copyright © 2023 Timo Wilken <[email protected]>
19;;; Copyright © 2023 Camilo Q.S. (Distopico) <[email protected]>
20;;;
21;;; This file is part of GNU Guix.
22;;;
23;;; GNU Guix is free software; you can redistribute it and/or modify it
24;;; under the terms of the GNU General Public License as published by
25;;; the Free Software Foundation; either version 3 of the License, or (at
26;;; your option) any later version.
27;;;
28;;; GNU Guix is distributed in the hope that it will be useful, but
29;;; WITHOUT ANY WARRANTY; without even the implied warranty of
30;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
31;;; GNU General Public License for more details.
32;;;
33;;; You should have received a copy of the GNU General Public License
34;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
35
36(define-module (gnu packages shellutils)
37 #:use-module ((guix licenses) #:prefix license:)
38 #:use-module (guix gexp)
39 #:use-module (guix utils)
40 #:use-module (guix packages)
41 #:use-module (guix download)
42 #:use-module (guix git-download)
43 #:use-module (guix build-system copy)
44 #:use-module (guix build-system gnu)
45 #:use-module (guix build-system go)
46 #:use-module (guix build-system python)
47 #:use-module (gnu packages autotools)
48 #:use-module (gnu packages base)
49 #:use-module (gnu packages bison)
50 #:use-module (gnu packages check)
51 #:use-module (gnu packages flex)
52 #:use-module (gnu packages golang)
53 #:use-module (gnu packages libunistring)
54 #:use-module (gnu packages ncurses)
55 #:use-module (gnu packages pcre)
56 #:use-module (gnu packages pkg-config)
57 #:use-module (gnu packages python)
58 #:use-module (gnu packages python-xyz)
59 #:use-module (gnu packages readline)
60 #:use-module (gnu packages ruby)
61 #:use-module (gnu packages shells)
62 #:use-module (gnu packages textutils)
63 #:use-module (gnu packages tmux)
64 #:use-module (gnu packages vim))
65
66(define-public ascii
67 (package
68 (name "ascii")
69 (version "3.18")
70 (source (origin
71 (method url-fetch)
72 (uri (string-append "http://www.catb.org/~esr/ascii/"
73 "ascii-" version ".tar.gz"))
74 (sha256
75 (base32
76 "0b87vy06s8s3a8q70pqavsbk4m4ff034sdml2xxa6qfsykaj513j"))))
77 (build-system gnu-build-system)
78 (arguments `(#:make-flags
79 (list (string-append "CC=" ,(cc-for-target))
80 (string-append "PREFIX=" %output))
81 #:phases
82 (modify-phases %standard-phases
83 (delete 'configure)
84 (add-before 'install 'create-directories
85 (lambda* (#:key outputs #:allow-other-keys)
86 (let* ((out (assoc-ref outputs "out"))
87 (bin (string-append out "/bin"))
88 (man1 (string-append out "/share/man/man1")))
89 (mkdir-p bin)
90 (mkdir-p man1)))))
91 #:tests? #f))
92 (home-page "http://www.catb.org/~esr/ascii/")
93 (synopsis "ASCII name and synonym chart")
94 (description
95 "The @code{ascii} utility provides easy conversion between various byte
96representations and the American Standard Code for Information Interchange
97(ASCII) character table. It knows about a wide variety of hex, binary, octal,
98Teletype mnemonic, ISO/ECMA code point, slang names, XML entity names, and
99other representations. Given any one on the command line, it will try to
100display all others. Called with no arguments it displays a handy small ASCII
101chart.")
102 (license license:bsd-2)))
103
104(define-public boxes
105 (package
106 (name "boxes")
107 (version "2.2.0")
108 (source (origin
109 (method git-fetch)
110 (uri (git-reference
111 (url "https://github.com/ascii-boxes/boxes")
112 (commit (string-append "v" version))))
113 (file-name (git-file-name name version))
114 (sha256
115 (base32
116 "0vv2gaav1m4z2xdk0k3ragmv4kcnzv7p3v97lkjl1wbfmk5nhz07"))))
117 (build-system gnu-build-system)
118 (arguments
119 `(#:test-target "test"
120 #:make-flags (list (string-append "GLOBALCONF="
121 (assoc-ref %outputs "out")
122 "/etc/boxes-config"))
123 #:modules
124 ((ice-9 match)
125 ,@%gnu-build-system-modules)
126 #:phases
127 (modify-phases %standard-phases
128 (delete 'configure)
129 (replace 'install
130 (lambda* (#:key outputs #:allow-other-keys)
131 (let ((out (assoc-ref outputs "out")))
132 (for-each (match-lambda
133 ((source target)
134 (install-file source
135 (string-append out "/" target))))
136 '(("out/boxes" "bin/")
137 ("doc/boxes.1" "share/man/man1/")
138 ("boxes-config" "etc/")))))))))
139 (native-inputs
140 (list bison flex
141 ;; For the tests.
142 xxd))
143 (inputs
144 (list libunistring pcre2))
145 (home-page "https://boxes.thomasjensen.com")
146 (synopsis "Command line ASCII boxes")
147 (description
148 "This command-line filter program draws ASCII-art boxes around your input
149text.")
150 (license license:gpl2)))
151
152(define-public zsh-autopair
153 (package
154 (name "zsh-autopair")
155 (version "1.0")
156 (home-page "https://github.com/hlissner/zsh-autopair")
157 (source (origin
158 (method git-fetch)
159 (uri (git-reference
160 (url "https://github.com/hlissner/zsh-autopair.git")
161 (commit (string-append "v" version))))
162 (file-name (git-file-name name version))
163 (sha256
164 (base32
165 "1h0vm2dgrmb8i2pvsgis3lshc5b0ad846836m62y8h3rdb3zmpy1"))))
166 (build-system copy-build-system)
167 (arguments
168 '(#:install-plan '(("autopair.zsh"
169 "/share/zsh/plugins/zsh-autopair/zsh-autopair.zsh"))))
170 (synopsis "Auto-close and delete matching delimiters in Zsh")
171 (description
172 "This Zsh plugin auto-closes, deletes, and skips over matching delimiters
173in Zsh intelligently.")
174 (license license:expat)))
175
176(define-public zsh-autosuggestions
177 (package
178 (name "zsh-autosuggestions")
179 (version "0.7.0")
180 (source (origin
181 (method git-fetch)
182 (uri (git-reference
183 (url "https://github.com/zsh-users/zsh-autosuggestions")
184 (commit (string-append "v" version))))
185 (file-name (git-file-name name version))
186 (sha256
187 (base32
188 "1g3pij5qn2j7v7jjac2a63lxd97mcsgw6xq6k5p7835q9fjiid98"))))
189 (build-system gnu-build-system)
190 (native-inputs
191 (list ruby
192 ruby-pry
193 ruby-rspec
194 ruby-rspec-wait
195 tmux
196 zsh))
197 (arguments
198 (list
199 #:phases
200 #~(modify-phases %standard-phases
201 (add-after 'unpack 'patch-tests
202 (lambda _
203 ;; Failing tests since tmux-3.2a
204 (delete-file "spec/options/buffer_max_size_spec.rb")))
205 (delete 'configure)
206 (replace 'check ; Tests use ruby's bundler; instead execute rspec directly.
207 (lambda _
208 (setenv "TMUX_TMPDIR" (getenv "TMPDIR"))
209 (setenv "SHELL" (which "zsh"))
210 (invoke "rspec")))
211 (replace 'install
212 (lambda* (#:key outputs #:allow-other-keys)
213 (let* ((out (assoc-ref outputs "out"))
214 (zsh-plugins
215 (string-append out "/share/zsh/plugins/zsh-autosuggestions")))
216 (invoke "make" "all")
217 (install-file "zsh-autosuggestions.zsh" zsh-plugins)))))))
218 (home-page "https://github.com/zsh-users/zsh-autosuggestions")
219 (synopsis "Fish-like autosuggestions for zsh")
220 (description
221 "Fish-like fast/unobtrusive autosuggestions for zsh. It suggests commands
222as you type.")
223 (license license:expat)))
224
225(define-public zsh-completions
226 (package
227 (name "zsh-completions")
228 (version "0.34.0")
229 (home-page "https://github.com/zsh-users/zsh-completions")
230 (source (origin
231 (method git-fetch)
232 (uri (git-reference
233 (url home-page)
234 (commit version)))
235 (file-name (git-file-name name version))
236 (sha256
237 (base32
238 "0jjgvzj3v31yibjmq50s80s3sqi4d91yin45pvn3fpnihcrinam9"))))
239 (build-system copy-build-system)
240 (arguments
241 '(#:install-plan '(("src/" "share/zsh/site-functions/")
242 ("README.md" "share/doc/zsh-completions/"))))
243 (synopsis "Additional completion definitions for Zsh")
244 (description
245 "This projects aims at gathering/developing new completion scripts that
246are not available in Zsh yet. The scripts may be contributed to the Zsh
247project when stable enough.")
248 (license (license:non-copyleft "file://LICENSE"
249 "Custom BSD-like, permissive, non-copyleft license."))))
250
251(define-public zsh-history-substring-search
252 (package
253 (name "zsh-history-substring-search")
254 (version "1.0.2")
255 (home-page "https://github.com/zsh-users/zsh-history-substring-search")
256 (source (origin
257 (method git-fetch)
258 (uri (git-reference
259 (url home-page)
260 (commit (string-append "v" version))))
261 (file-name (git-file-name name version))
262 (sha256
263 (base32
264 "0y8va5kc2ram38hbk2cibkk64ffrabfv1sh4xm7pjspsba9n5p1y"))))
265 (build-system copy-build-system)
266 (arguments
267 '(#:install-plan '(("zsh-history-substring-search.plugin.zsh"
268 "share/zsh/plugins/zsh-history-substring-search/")
269 ("zsh-history-substring-search.zsh"
270 "share/zsh/plugins/zsh-history-substring-search/")
271 ("README.md" "share/doc/zsh-history-substring-search/"))))
272 (synopsis "ZSH port of Fish history search (up arrow)")
273 (description
274 "This is a clean-room implementation of the Fish shell's history search
275feature, where you can type in any part of any command from history and then
276press chosen keys, such as the UP and DOWN arrows, to cycle through matches.")
277 (license license:bsd-3)))
278
279(define-public zsh-syntax-highlighting
280 (package
281 (name "zsh-syntax-highlighting")
282 (version "0.7.1")
283 (source (origin
284 (method git-fetch)
285 (uri (git-reference
286 (url "https://github.com/zsh-users/zsh-syntax-highlighting")
287 (commit version)))
288 (file-name (git-file-name name version))
289 (sha256
290 (base32
291 "039g3n59drk818ylcyvkciv8k9mf739cv6v4vis1h9fv9whbcmwl"))))
292 (build-system gnu-build-system)
293 (native-inputs
294 (list zsh))
295 (arguments
296 ;; FIXME: Tests fail when running test regexp
297 ;; there is no pcre module in the Guix zsh package
298 `(#:tests? #f
299 #:phases
300 (modify-phases %standard-phases
301 (delete 'configure)
302 (add-after 'unpack 'patch-paths
303 (lambda* (#:key outputs #:allow-other-keys)
304 (let ((out (assoc-ref outputs "out")))
305 (substitute* "Makefile"
306 (("/usr/local") out)
307 (("share/\\$\\(NAME\\)") "share/zsh/plugins/$(NAME)")))))
308 (add-after 'patch-paths 'make-writable
309 (lambda _
310 (for-each make-file-writable
311 '("docs/highlighters.md"
312 "README.md"))))
313 (add-before 'build 'add-all-md
314 (lambda _
315 (invoke "make" "all")))
316 (replace 'check
317 (lambda* (#:key tests? #:allow-other-keys)
318 (when tests?
319 (invoke "make" "test")
320 (invoke "make" "perf")))))))
321 (home-page "https://github.com/zsh-users/zsh-syntax-highlighting")
322 (synopsis "Fish shell-like syntax highlighting for Zsh")
323 (description
324 "This package provides syntax highlighting for Zsh. It enables
325highlighting of commands whilst they are typed at a Zsh prompt into an
326interactive terminal. This helps in reviewing commands before running them,
327particularly in catching syntax errors.")
328 (license license:bsd-3)))
329
330(define-public grml-zsh-config
331 (package
332 (name "grml-zsh-config")
333 (version "0.19.5")
334 (source (origin
335 (method url-fetch)
336 (uri (string-append
337 "https://deb.grml.org/pool/main/g/grml-etc-core/grml-etc-core_"
338 version ".tar.gz"))
339 (sha256
340 (base32
341 "0ifw490z3v9ljccbmm04adz39fj2dmx8mjgayxqj0a9ln90yfdc4"))))
342 (build-system copy-build-system)
343 (arguments
344 (list
345 #:phases
346 #~(modify-phases
347 %standard-phases
348 (add-before 'install 'make-doc
349 (lambda _ (with-directory-excursion "doc" (invoke "make")))))
350 #:install-plan
351 #~'(("etc/skel/.zshrc" "etc/skel/.zshrc")
352 ("etc/zsh/keephack" "etc/zsh/keephack")
353 ("etc/zsh/zshrc" "etc/zsh/zshrc")
354 ("doc/grmlzshrc.5" "share/man/man5/grmlzshrc.5"))))
355 (native-inputs (list txt2tags))
356 (home-page "https://grml.org/zsh/")
357 (synopsis "Grml's zsh configuration")
358 (description "This package provides an interactive setup for zsh
359preconfigured by the Grml project.")
360 (license license:gpl2)))
361
362(define-public sh-z
363 (package
364 (name "sh-z")
365 (version "1.11")
366 (source (origin
367 (method git-fetch)
368 (uri (git-reference
369 (url "https://github.com/rupa/z")
370 (commit (string-append "v" version))))
371 (file-name (git-file-name name version))
372 (sha256
373 (base32
374 "13zbgkj6y0qhvn5jpkrqbd4jjxjr789k228iwma5hjfh1nx7ghyb"))))
375 (build-system gnu-build-system)
376 (arguments
377 `(#:tests? #f ; No tests provided
378 #:phases
379 (modify-phases %standard-phases
380 (delete 'configure)
381 (delete 'build)
382 (replace 'install
383 (lambda* (#:key outputs #:allow-other-keys)
384 (let* ((out (assoc-ref outputs "out"))
385 (man (string-append out "/share/man/man1"))
386 (bin (string-append out "/bin")))
387 (install-file "z.sh" bin)
388 (chmod (string-append bin "/z.sh") #o755)
389 (install-file "z.1" man)
390 #t))))))
391 (synopsis "Jump about directories")
392 (description
393 "Tracks your most used directories, based on ``frecency''. After a short
394learning phase, z will take you to the most ``frecent'' directory that matches
395all of the regexes given on the command line in order.")
396 (home-page "https://github.com/rupa/z")
397 (license license:expat)))
398
399(define-public envstore
400 (package
401 (name "envstore")
402 (version "2.1")
403 (source
404 (origin
405 (method url-fetch)
406 (uri (string-append "https://finalrewind.org/projects/"
407 name "/" name "-" version ".tar.bz2"))
408 (sha256
409 (base32 "1x97lxad80m5blhdfanl5v2qzjwcgbij2i23701bn8mpyxsrqszi"))))
410 (build-system gnu-build-system)
411 (arguments
412 `(#:test-target "test"
413 #:make-flags (list "CC=gcc"
414 (string-append "PREFIX=" (assoc-ref %outputs "out")))
415 #:phases
416 (modify-phases %standard-phases
417 (delete 'configure))))
418 (home-page "https://finalrewind.org/projects/envstore/")
419 (synopsis "Save and restore environment variables")
420 (description "Envstore is a program for sharing environment variables
421between various shells or commands.")
422 (license license:wtfpl2)))
423
424(define-public trash-cli
425 (package
426 (name "trash-cli")
427 (version "0.22.10.20")
428 (source
429 (origin
430 (method git-fetch)
431 (uri (git-reference
432 (url "https://github.com/andreafrancia/trash-cli")
433 (commit version)))
434 (file-name (git-file-name name version))
435 (sha256
436 (base32
437 "0hkn0hmwrag56g447ddqapib0s399a6b4a9wlliif6zmirxlww9n"))))
438 (build-system python-build-system)
439 (arguments
440 (list #:phases
441 #~(modify-phases %standard-phases
442 (add-before 'build 'patch-path-constants
443 (lambda* (#:key inputs #:allow-other-keys)
444 (let ((libc (search-input-file inputs "lib/libc.so.6"))
445 (df #$(file-append coreutils "/bin/df")))
446 (substitute* "trashcli/list_mount_points.py"
447 (("\"/lib/libc.so.6\".*")
448 (string-append "\"" libc "\"\n"))
449 (("\"df\"")
450 (string-append "\"" df "\""))))))
451 (add-before 'build 'fix-setup.py
452 (lambda* (#:key outputs #:allow-other-keys)
453 (let ((bin (string-append #$output "/bin")))
454 (mkdir-p bin)
455 (substitute* "setup.py"
456 (("add_script\\('")
457 (string-append "add_script('" bin "/" ))))))
458 ;; Whenever setup.py is invoked, scripts in out/bin/ are
459 ;; replaced. Thus we cannot invoke setup.py for testing.
460 ;; Upstream also uses pytest.
461 (replace 'check
462 (lambda* (#:key tests? #:allow-other-keys)
463 (when tests?
464 (invoke "pytest")))))))
465 (native-inputs
466 (list python-pytest
467 python-parameterized
468 python-flexmock
469 python-mock
470 python-six))
471 (inputs (list coreutils))
472 (propagated-inputs
473 (list python-psutil))
474 (home-page "https://github.com/andreafrancia/trash-cli")
475 (synopsis "Trash can management tool")
476 (description
477 "trash-cli is a command line utility for interacting with the
478FreeDesktop.org trash can used by GNOME, KDE, XFCE, and other common desktop
479environments. It can move files to the trash, and remove or list files that
480are already there.")
481 (license license:gpl2+)))
482
483(define-public direnv
484 (package
485 (name "direnv")
486 (version "2.32.3")
487 (source
488 (origin (method git-fetch)
489 (uri (git-reference
490 (url "https://github.com/direnv/direnv")
491 (commit (string-append "v" version))))
492 (file-name (git-file-name name version))
493 (sha256
494 (base32
495 "1hyl67n7na19zm3ksiiyva4228alx0jfh9l3v1mxszn9prwgcfjc"))))
496 (build-system go-build-system)
497 (arguments
498 '(#:import-path "github.com/direnv/direnv"
499 #:phases
500 (modify-phases %standard-phases
501 (add-after 'install 'install-manpages
502 (lambda* (#:key outputs #:allow-other-keys)
503 (let* ((out (assoc-ref outputs "out"))
504 (man (string-append out "/share/man/man1")))
505 (mkdir-p man)
506 (with-directory-excursion "src/github.com/direnv/direnv"
507 (install-file "man/direnv.1" man)
508 (install-file "man/direnv-stdlib.1" man)
509 (install-file "man/direnv.toml.1" man)))))
510 (replace 'check
511 (lambda* (#:key tests? #:allow-other-keys)
512 (when tests?
513 (setenv "HOME" "/tmp")
514 (with-directory-excursion "src/github.com/direnv/direnv"
515 ;; The following file needs to be writable so it can be
516 ;; modified by the testsuite.
517 (make-file-writable "test/scenarios/base/.envrc")
518 ;; We need to manually run test because make test
519 ;; tries to use go modules
520 (invoke "go" "test" "./...")
521 ;; Clean up from the tests, especially so that the extra
522 ;; direnv executable that's generated is removed.
523 (invoke "make" "clean"))))))))
524 (native-inputs
525 (list go-github-com-burntsushi-toml go-github-com-direnv-go-dotenv
526 go-github-com-mattn-go-isatty go-golang-org-x-mod which))
527 (home-page "https://direnv.net/")
528 (synopsis "Environment switcher for the shell")
529 (description
530 "direnv can hook into the bash, zsh, tcsh, and fish shells to load
531or unload environment variables depending on the current directory. This
532allows project-specific environment variables without using @file{~/.profile}.
533
534Before each prompt, direnv checks for the existence of a @file{.envrc} file in
535the current and parent directories. This file is then used to alter the
536environment variables of the current shell.")
537 (license license:expat)))
538
539(define-public fzy
540 (package
541 (name "fzy")
542 (version "1.0")
543 (source
544 (origin
545 (method git-fetch)
546 (uri (git-reference
547 (url "https://github.com/jhawthorn/fzy")
548 (commit version)))
549 (file-name (git-file-name name version))
550 (sha256
551 (base32
552 "1gkzdvj73f71388jvym47075l9zw61v6l8wdv2lnc0mns6dxig0k"))))
553 (build-system gnu-build-system)
554 (arguments
555 '(#:make-flags (list "CC=gcc"
556 (string-append "PREFIX=" (assoc-ref %outputs "out")))
557 #:phases
558 (modify-phases %standard-phases
559 (delete 'configure))))
560 (home-page "https://github.com/jhawthorn/fzy")
561 (synopsis "Fast fuzzy text selector for the terminal with an advanced
562scoring algorithm")
563 (description
564 "Most other fuzzy matchers sort based on the length of a match. fzy tries
565to find the result the user intended. It does this by favouring matches on
566consecutive letters and starts of words. This allows matching using acronyms
567or different parts of the path.
568
569fzy is designed to be used both as an editor plugin and on the command
570line. Rather than clearing the screen, fzy displays its interface directly
571below the current cursor position, scrolling the screen if necessary.")
572 (license license:expat)))
573
574(define-public hstr
575 (package
576 (name "hstr")
577 (version "3.1")
578 (source (origin
579 (method git-fetch)
580 (uri (git-reference
581 (url "https://github.com/dvorka/hstr")
582 (commit version)))
583 (file-name (git-file-name name version))
584 (sha256
585 (base32
586 "1w1xr0ddf34i46b8wwz2snf7ap6m0mv53zid3d1l5hc4m3az5qis"))))
587 (build-system gnu-build-system)
588 (arguments
589 `(#:phases
590 (modify-phases %standard-phases
591 (add-before 'build 'adjust-ncurses-includes
592 (lambda* (#:key make-flags outputs #:allow-other-keys)
593 (let ((out (assoc-ref outputs "out")))
594 (substitute* "src/include/hstr_curses.h"
595 (("ncursesw\\/curses.h") "ncurses.h"))
596 (substitute* "src/include/hstr.h"
597 (("ncursesw\\/curses.h") "ncurses.h")))
598 #t)))))
599 (native-inputs
600 (list autoconf automake pkg-config))
601 (inputs
602 (list ncurses readline))
603 (synopsis "Navigate and search command history with shell history suggest box")
604 (description "HSTR (HiSToRy) is a command-line utility that brings
605improved Bash and Zsh command completion from the history. It aims to make
606completion easier and more efficient than with @kbd{Ctrl-R}. It allows you to
607easily view, navigate, and search your command history with suggestion boxes.
608HSTR can also manage your command history (for instance you can remove
609commands that are obsolete or contain a piece of sensitive information) or
610bookmark your favourite commands.")
611 (home-page "https://me.mindforger.com/projects/hh.html")
612 (license license:asl2.0)))
613
614(define-public shell-functools
615 (package
616 (name "shell-functools")
617 (version "0.3.0")
618 (source (origin
619 (method git-fetch)
620 (uri (git-reference
621 (url "https://github.com/sharkdp/shell-functools")
622 (commit (string-append "v" version))))
623 (file-name (git-file-name name version))
624 (sha256
625 (base32
626 "0d6zzg7cxfrzwzh1wmpj7q85kz33sak6ac59ncsm6dlbin12h0hi"))))
627 (build-system python-build-system)
628 (home-page "https://github.com/sharkdp/shell-functools/")
629 (synopsis "Functional programming tools for the shell")
630 (description "This package provides higher order functions like map,
631filter, foldl, sort_by and take_while as simple command-line tools. Following
632the UNIX philosophy, these commands are designed to be composed via pipes. A
633large collection of functions such as basename, replace, contains or is_dir
634are provided as arguments to these commands.")
635 (license license:expat)))
636
637(define-public rig
638 (package
639 (name "rig")
640 (version "1.11")
641 (source (origin
642 (method url-fetch)
643 (uri (string-append "mirror://sourceforge/rig/rig/"
644 version "/rig-"
645 version ".tar.gz"))
646 (sha256
647 (base32
648 "1f3snysjqqlpk2kgvm5p2icrj4lsdymccmn3igkc2f60smqckgq0"))))
649 (build-system gnu-build-system)
650 (arguments `(#:make-flags
651 (list (string-append "CXX=" ,(cxx-for-target))
652 (string-append "PREFIX=" %output))
653 #:phases
654 (modify-phases %standard-phases
655 (delete 'configure)
656 (add-after 'unpack 'fix-build
657 (lambda _
658 (substitute* "rig.cc"
659 (("^#include <string>")
660 "#include <cstring>"))
661 (substitute* "Makefile"
662 (("g\\+\\+")
663 "${CXX} -O2")
664 (("install -g 0 -m 755 -o 0 -s rig \\$\\(BINDIR\\)")
665 "install -m 755 -d $(DESTDIR)$(BINDIR)\n\t\
666install -m 755 rig $(DESTDIR)$(BINDIR)/rig")
667 (("install -g 0 -m 644 -o 0 rig.6 \\$\\(MANDIR\\)/man6/rig.6")
668 "install -m 755 -d $(DESTDIR)$(MANDIR)/man6/\n\t\
669install -m 644 rig.6 $(DESTDIR)$(MANDIR)/man6/rig.6")
670 (("install -g 0 -m 755 -o 0 -d \\$\\(DATADIR\\)")
671 "install -m 755 -d $(DESTDIR)$(DATADIR)")
672 (("install -g 0 -m 644 -o 0 data/\\*.idx \\$\\(DATADIR\\)")
673 "install -m 644 data/*.idx $(DESTDIR)$(DATADIR)")))))
674 #:tests? #f))
675 (home-page "https://rig.sourceforge.net")
676 (synopsis "Random identity generator")
677 (description
678 "RIG (Random Identity Generator) generates random, yet real-looking,
679personal data. It is useful if you need to feed a name to a Web site, BBS, or
680real person, and are too lazy to think of one yourself. Also, if the Web
681site/BBS/person you are giving the information to tries to cross-check the
682city, state, zip, or area code, it will check out.")
683 (license license:gpl2+)))
684
685(define-public conflict
686 (package
687 (name "conflict")
688 (version "20210108")
689 (source (origin
690 (method url-fetch)
691 (uri (string-append
692 "https://invisible-mirror.net/archives/conflict/conflict-"
693 version ".tgz"))
694 (sha256
695 (base32
696 "0mls4climvp7v9hnc3zh01mh270kqcj797ng0xslwb027lipis4h"))))
697 (build-system gnu-build-system)
698 (arguments
699 `(#:phases
700 (modify-phases %standard-phases
701 (add-after 'unpack 'fix-paths
702 (lambda _
703 (substitute* "run_test.sh"
704 (("PATH=\".:\\$BIN:/bin\"")
705 "PATH=\".:$BIN:$PATH\"")))))))
706 (home-page "https://invisible-island.net/conflict/conflict.html")
707 (synopsis "Displays conflicting filenames in your execution path")
708 (description
709 "@code{conflict} examines the user-specifiable list of programs, looking
710for instances in the user's path which conflict (i.e., the name appears in
711more than one point in the path).")
712 (license (license:x11-style "file://COPYING"))))
713
714(define-public renameutils
715 (package
716 (name "renameutils")
717 (version "0.12.0")
718 (source
719 (origin
720 (method url-fetch)
721 (uri (string-append "mirror://savannah/renameutils/"
722 "renameutils-" version ".tar.gz"))
723 (sha256
724 (base32
725 "18xlkr56jdyajjihcmfqlyyanzyiqqlzbhrm6695mkvw081g1lnb"))
726 (modules '((guix build utils)))
727 (snippet '(begin
728 (substitute* "src/Makefile.in"
729 (("\\(\\$bindir\\)") "$(bindir)"))
730 #t))))
731 (build-system gnu-build-system)
732 (inputs
733 (list readline))
734 (home-page "https://www.nongnu.org/renameutils/")
735 (synopsis "File renaming utilities")
736 (description "The file renaming utilities (renameutils for short) are a
737set of programs designed to make renaming of files faster and less cumbersome.
738The file renaming utilities consists of five programs: @command{qmv},
739@command{qcp}, @command{imv}, @command{icp}, and @command{deurlname}.")
740 (license license:gpl3+)))
741
742(define-public grc
743 (package
744 (name "grc")
745 (version "1.13")
746 (source
747 (origin
748 (method git-fetch)
749 (uri (git-reference
750 (url "https://github.com/garabik/grc")
751 (commit (string-append "v" version))))
752 (file-name (git-file-name name version))
753 (sha256
754 (base32 "1h0h88h484a9796hai0wasi1xmjxxhpyxgixn6fgdyc5h69gv8nl"))))
755 (build-system gnu-build-system)
756 (inputs
757 (list python))
758 (arguments
759 (list
760 #:phases
761 #~(modify-phases %standard-phases
762 (delete 'configure)
763 (replace 'build
764 (lambda _
765 (substitute* "grc"
766 (("conffilenames = \\[.*\\]")
767 (string-append
768 "conffilenames = ["
769 "os.environ.get('GUIX_ENVIRONMENT', '" #$output "') "
770 "+ '/etc/grc.conf']")))
771 (substitute* "grcat"
772 (("conffilepath \\+= \\['/usr/.*\\]")
773 (string-append
774 "conffilepath += ["
775 "os.environ.get('GUIX_ENVIRONMENT', '" #$output "') "
776 "+ '/share/grc/']"))))) ;; trailing slash!
777 (delete 'check)
778 (replace 'install
779 (lambda _
780 (invoke "sh" "install.sh" #$output #$output))))))
781 (home-page "http://kassiopeia.juls.savba.sk/~garabik/software/grc.html")
782 (synopsis "Generic colouriser for everything")
783 (description "@code{grc} can be used to colourise logfiles, output of
784shell commands, arbitrary text, etc. Many shell commands are supported out of
785the box.
786
787You might want to add these lines you your @code{~/.bashrc}:
788@example
789GRC_ALIASES=true
790source ${GUIX_ENVIRONMENT:-$HOME/.guix-profile}/etc/profile.d/grc.sh
791@end example
792")
793 (license license:gpl2)))