projects/guix·blob beam-team · refs

1266 lines · 51.3 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, 2025 Camilo Q.S. (Distopico) <[email protected]>
20;;; Copyright © 2023 Zheng Junjie <[email protected]>
21;;; Copyright © 2024 Artyom V. Poptsov <[email protected]>
22;;; Copyright © 2024 Brian Kubisiak <[email protected]>
23;;; Copyright © 2024 Jordan Moore <[email protected]>
24;;; Copyright © 2025 Gabriel Santos <[email protected]>
25;;; Copyright © 2025 Skylar Hill <[email protected]>
26;;;
27;;; This file is part of GNU Guix.
28;;;
29;;; GNU Guix is free software; you can redistribute it and/or modify it
30;;; under the terms of the GNU General Public License as published by
31;;; the Free Software Foundation; either version 3 of the License, or (at
32;;; your option) any later version.
33;;;
34;;; GNU Guix is distributed in the hope that it will be useful, but
35;;; WITHOUT ANY WARRANTY; without even the implied warranty of
36;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
37;;; GNU General Public License for more details.
38;;;
39;;; You should have received a copy of the GNU General Public License
40;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
41
42(define-module (gnu packages shellutils)
43 #:use-module ((guix licenses) #:prefix license:)
44 #:use-module (guix gexp)
45 #:use-module (guix utils)
46 #:use-module (guix packages)
47 #:use-module (guix download)
48 #:use-module (guix git-download)
49 #:use-module (guix build-system cargo)
50 #:use-module (guix build-system copy)
51 #:use-module (guix build-system gnu)
52 #:use-module (guix build-system go)
53 #:use-module (guix build-system pyproject)
54 #:use-module (gnu packages)
55 #:use-module (gnu packages admin)
56 #:use-module (gnu packages autotools)
57 #:use-module (gnu packages base)
58 #:use-module (gnu packages bison)
59 #:use-module (gnu packages check)
60 #:use-module (gnu packages cmake)
61 #:use-module (gnu packages compiler-tools)
62 #:use-module (gnu packages golang-build)
63 #:use-module (gnu packages golang-check)
64 #:use-module (gnu packages golang-xyz)
65 #:use-module (gnu packages libunistring)
66 #:use-module (gnu packages ncurses)
67 #:use-module (gnu packages perl)
68 #:use-module (gnu packages pcre)
69 #:use-module (gnu packages pkg-config)
70 #:use-module (gnu packages python)
71 #:use-module (gnu packages python-build)
72 #:use-module (gnu packages python-check)
73 #:use-module (gnu packages python-xyz)
74 #:use-module (gnu packages readline)
75 #:use-module (gnu packages ruby)
76 #:use-module (gnu packages ruby-check)
77 #:use-module (gnu packages ruby-xyz)
78 #:use-module (gnu packages shells)
79 #:use-module (gnu packages textutils)
80 #:use-module (gnu packages tmux)
81 #:use-module (gnu packages version-control)
82 #:use-module (gnu packages vim))
83
84(define-public ascii
85 (package
86 (name "ascii")
87 (version "3.31")
88 (source (origin
89 (method url-fetch)
90 (uri (string-append "http://www.catb.org/~esr/ascii/"
91 "ascii-" version ".tar.gz"))
92 (sha256
93 (base32
94 "0g0159sbw9a6arclhnza56ah8hz3wr16famvq4x1p4j6rigsg6ih"))))
95 (build-system gnu-build-system)
96 (arguments
97 (list #:make-flags
98 #~(list (string-append "CC=" #$(cc-for-target))
99 (string-append "PREFIX=" #$output))
100 #:phases
101 #~(modify-phases %standard-phases
102 (delete 'configure)
103 (add-before 'install 'create-directories
104 (lambda* (#:key outputs #:allow-other-keys)
105 (let* ((out (assoc-ref outputs "out"))
106 (bin (string-append out "/bin"))
107 (man1 (string-append out "/share/man/man1")))
108 (mkdir-p bin)
109 (mkdir-p man1)))))
110 #:tests? #f))
111 (home-page "http://www.catb.org/~esr/ascii/")
112 (synopsis "ASCII name and synonym chart")
113 (description
114 "The @code{ascii} utility provides easy conversion between various byte
115representations and the American Standard Code for Information Interchange
116(ASCII) character table. It knows about a wide variety of hex, binary, octal,
117Teletype mnemonic, ISO/ECMA code point, slang names, XML entity names, and
118other representations. Given any one on the command line, it will try to
119display all others. Called with no arguments it displays a handy small ASCII
120chart.")
121 (license license:bsd-2)))
122
123(define-public boxes
124 (package
125 (name "boxes")
126 (version "2.3.1")
127 (source (origin
128 (method git-fetch)
129 (uri (git-reference
130 (url "https://github.com/ascii-boxes/boxes")
131 (commit (string-append "v" version))))
132 (file-name (git-file-name name version))
133 (sha256
134 (base32
135 "028vg9h3vxz3icy7hmxgyqhn62953h1ls6bxwbhdwhl1lpj5py3n"))))
136 (build-system gnu-build-system)
137 (arguments
138 `(#:test-target "utest"
139 #:make-flags (list (string-append "GLOBALCONF="
140 (assoc-ref %outputs "out")
141 "/etc/boxes-config"))
142 #:modules
143 ((ice-9 match)
144 ,@%default-gnu-modules)
145 #:phases
146 (modify-phases %standard-phases
147 (delete 'configure)
148 (replace 'install
149 (lambda* (#:key outputs #:allow-other-keys)
150 (let ((out (assoc-ref outputs "out")))
151 (for-each (match-lambda
152 ((source target)
153 (install-file source
154 (string-append out "/" target))))
155 '(("out/boxes" "bin/")
156 ("doc/boxes.1" "share/man/man1/")
157 ("boxes-config" "etc/")))))))))
158 (native-inputs
159 (list bison flex cmocka
160 ;; For the tests.
161 xxd))
162 (inputs
163 (list ncurses libunistring pcre2))
164 (home-page "https://boxes.thomasjensen.com")
165 (synopsis "Command line ASCII boxes")
166 (description
167 "This command-line filter program draws ASCII-art boxes around your input
168text.")
169 (license license:gpl2)))
170
171(define-public zsh-autopair
172 (package
173 (name "zsh-autopair")
174 (version "1.0")
175 (home-page "https://github.com/hlissner/zsh-autopair")
176 (source (origin
177 (method git-fetch)
178 (uri (git-reference
179 (url "https://github.com/hlissner/zsh-autopair.git")
180 (commit (string-append "v" version))))
181 (file-name (git-file-name name version))
182 (sha256
183 (base32
184 "1h0vm2dgrmb8i2pvsgis3lshc5b0ad846836m62y8h3rdb3zmpy1"))))
185 (build-system copy-build-system)
186 (arguments
187 '(#:install-plan '(("autopair.zsh"
188 "/share/zsh/plugins/zsh-autopair/zsh-autopair.zsh"))))
189 (synopsis "Auto-close and delete matching delimiters in Zsh")
190 (description
191 "This Zsh plugin auto-closes, deletes, and skips over matching delimiters
192in Zsh intelligently.")
193 (license license:expat)))
194
195(define-public zsh-autosuggestions
196 (package
197 (name "zsh-autosuggestions")
198 (version "0.7.1")
199 (source (origin
200 (method git-fetch)
201 (uri (git-reference
202 (url "https://github.com/zsh-users/zsh-autosuggestions")
203 (commit (string-append "v" version))))
204 (file-name (git-file-name name version))
205 (sha256
206 (base32
207 "02p5wq93i12w41cw6b00hcgmkc8k80aqzcy51qfzi0armxig555y"))))
208 (build-system gnu-build-system)
209 (native-inputs
210 (list ruby
211 ruby-pry
212 ruby-rspec
213 ruby-rspec-wait
214 tmux
215 zsh))
216 (arguments
217 (list
218 #:phases
219 #~(modify-phases %standard-phases
220 (add-after 'unpack 'patch-tests
221 (lambda _
222 ;; Failing tests since tmux-3.2a
223 (delete-file "spec/options/buffer_max_size_spec.rb")))
224 (delete 'configure)
225 (replace 'check ; Tests use ruby's bundler; instead execute rspec directly.
226 (lambda _
227 (setenv "TMUX_TMPDIR" (getenv "TMPDIR"))
228 (setenv "SHELL" (which "zsh"))
229 (invoke "rspec")))
230 (replace 'install
231 (lambda* (#:key outputs #:allow-other-keys)
232 (let* ((out (assoc-ref outputs "out"))
233 (zsh-plugins
234 (string-append out "/share/zsh/plugins/zsh-autosuggestions")))
235 (invoke "make" "all")
236 (install-file "zsh-autosuggestions.zsh" zsh-plugins)))))))
237 (home-page "https://github.com/zsh-users/zsh-autosuggestions")
238 (synopsis "Fish-like autosuggestions for zsh")
239 (description
240 "Fish-like fast/unobtrusive autosuggestions for zsh. It suggests commands
241as you type.")
242 (license license:expat)))
243
244(define-public zsh-completions
245 (package
246 (name "zsh-completions")
247 (version "0.36.0")
248 (home-page "https://github.com/zsh-users/zsh-completions")
249 (source (origin
250 (method git-fetch)
251 (uri (git-reference
252 (url home-page)
253 (commit version)))
254 (file-name (git-file-name name version))
255 (sha256
256 (base32
257 "0ah3q756f1aahinzfb0mxbqv177ypg5pcnrv59rpqzm17kn8492w"))))
258 (build-system copy-build-system)
259 (arguments
260 '(#:install-plan '(("src/" "share/zsh/site-functions/")
261 ("README.md" "share/doc/zsh-completions/"))))
262 (synopsis "Additional completion definitions for Zsh")
263 (description
264 "This projects aims at gathering/developing new completion scripts that
265are not available in Zsh yet. The scripts may be contributed to the Zsh
266project when stable enough.")
267 (license (license:non-copyleft "file://LICENSE"
268 "Custom BSD-like, permissive, non-copyleft license."))))
269
270(define-public zsh-history-substring-search
271 (package
272 (name "zsh-history-substring-search")
273 (version "1.1.0")
274 (home-page "https://github.com/zsh-users/zsh-history-substring-search")
275 (source (origin
276 (method git-fetch)
277 (uri (git-reference
278 (url home-page)
279 (commit (string-append "v" version))))
280 (file-name (git-file-name name version))
281 (sha256
282 (base32
283 "0vjw4s0h4sams1a1jg9jx92d6hd2swq4z908nbmmm2qnz212y88r"))))
284 (build-system copy-build-system)
285 (arguments
286 '(#:install-plan '(("zsh-history-substring-search.plugin.zsh"
287 "share/zsh/plugins/zsh-history-substring-search/")
288 ("zsh-history-substring-search.zsh"
289 "share/zsh/plugins/zsh-history-substring-search/")
290 ("README.md" "share/doc/zsh-history-substring-search/"))))
291 (synopsis "ZSH port of Fish history search (up arrow)")
292 (description
293 "This is a clean-room implementation of the Fish shell's history search
294feature, where you can type in any part of any command from history and then
295press chosen keys, such as the UP and DOWN arrows, to cycle through matches.")
296 (license license:bsd-3)))
297
298(define-public zsh-syntax-highlighting
299 (package
300 (name "zsh-syntax-highlighting")
301 (version "0.8.0")
302 (source (origin
303 (method git-fetch)
304 (uri (git-reference
305 (url "https://github.com/zsh-users/zsh-syntax-highlighting")
306 (commit version)))
307 (file-name (git-file-name name version))
308 (sha256
309 (base32
310 "0f482llznpkdg3kv92mjq53djpi4023bdmq06lk1qh05gnp2qg46"))))
311 (build-system gnu-build-system)
312 (native-inputs
313 (list zsh coreutils grep))
314 (arguments
315 ;; FIXME: Tests have expected failures (easy way to skip just those tests?)
316 (list
317 #:tests? #f
318 #:phases
319 #~(modify-phases %standard-phases
320 (delete 'configure)
321 (add-after 'unpack 'patch-paths
322 (lambda _
323 (substitute* "Makefile"
324 (("/usr/local") #$output)
325 (("share/\\$\\(NAME\\)") "share/zsh/plugins/$(NAME)")
326 (("env -i") "env -i PATH=$$PATH"))))
327 (add-after 'patch-paths 'make-writable
328 (lambda _
329 (for-each make-file-writable
330 '("docs/highlighters.md"
331 "README.md"))))
332 (add-before 'build 'add-all-md
333 (lambda _
334 (invoke "make" "all")))
335 (replace 'check
336 (lambda* (#:key tests? #:allow-other-keys)
337 (when tests?
338 (invoke "make" "test" (string-append "ZSH=" #$zsh "/bin/zsh"))
339 (invoke "make" "perf" (string-append "ZSH=" #$zsh "/bin/zsh"))))))))
340 (home-page "https://github.com/zsh-users/zsh-syntax-highlighting")
341 (synopsis "Fish shell-like syntax highlighting for Zsh")
342 (description
343 "This package provides syntax highlighting for Zsh. It enables
344highlighting of commands whilst they are typed at a Zsh prompt into an
345interactive terminal. This helps in reviewing commands before running them,
346particularly in catching syntax errors.")
347 (license license:bsd-3)))
348
349(define-public zsh-vi-mode
350 (package
351 (name "zsh-vi-mode")
352 (version "0.11.0")
353 (home-page "https://github.com/jeffreytse/zsh-vi-mode")
354 (source
355 (origin
356 (method git-fetch)
357 (uri (git-reference
358 (url "https://github.com/jeffreytse/zsh-vi-mode")
359 (commit (string-append "v" version))))
360 (file-name (git-file-name name version))
361 (sha256
362 "0bs5p6p5846hcgf3rb234yzq87rfjs18gfha9w0y0nf5jif23dy5")))
363 (build-system copy-build-system)
364 (arguments
365 (list
366 #:install-plan
367 #~'(("zsh-vi-mode.zsh" "share/zsh/plugins/zsh-vi-mode/")
368 ("zsh-vi-mode.plugin.zsh" "share/zsh/plugins/zsh-vi-mode/"))))
369 (synopsis "Plugin to improve vi keybindings in zsh")
370 (description "This package provides a zsh vimkey plugin with more features,
371which more closely matches the standard behavior of vim.")
372 (license license:expat)))
373
374(define-public grml-zsh-config
375 (package
376 (name "grml-zsh-config")
377 (version "0.19.6")
378 (source (origin
379 (method url-fetch)
380 (uri (string-append
381 "https://deb.grml.org/pool/main/g/grml-etc-core/grml-etc-core_"
382 version ".tar.gz"))
383 (sha256
384 (base32
385 "1k1m2fbmvw73qy9mc6k2ygjg6zz8h7nn3d9pvj6jbjadnx4pz770"))))
386 (build-system copy-build-system)
387 (arguments
388 (list
389 #:phases
390 #~(modify-phases
391 %standard-phases
392 (add-before 'install 'make-doc
393 (lambda _ (with-directory-excursion "doc" (invoke "make")))))
394 #:install-plan
395 #~'(("etc/skel/.zshrc" "etc/skel/.zshrc")
396 ("etc/zsh/keephack" "etc/zsh/keephack")
397 ("etc/zsh/zshrc" "etc/zsh/zshrc")
398 ("doc/grmlzshrc.5" "share/man/man5/grmlzshrc.5"))))
399 (native-inputs (list txt2tags))
400 (home-page "https://grml.org/zsh/")
401 (synopsis "Grml's zsh configuration")
402 (description "This package provides an interactive setup for zsh
403preconfigured by the Grml project.")
404 (license license:gpl2)))
405
406(define-public sh-z
407 (package
408 (name "sh-z")
409 (version "1.11")
410 (source (origin
411 (method git-fetch)
412 (uri (git-reference
413 (url "https://github.com/rupa/z")
414 (commit (string-append "v" version))))
415 (file-name (git-file-name name version))
416 (sha256
417 (base32
418 "13zbgkj6y0qhvn5jpkrqbd4jjxjr789k228iwma5hjfh1nx7ghyb"))))
419 (build-system gnu-build-system)
420 (arguments
421 `(#:tests? #f ; No tests provided
422 #:phases
423 (modify-phases %standard-phases
424 (delete 'configure)
425 (delete 'build)
426 (replace 'install
427 (lambda* (#:key outputs #:allow-other-keys)
428 (let* ((out (assoc-ref outputs "out"))
429 (man (string-append out "/share/man/man1"))
430 (bin (string-append out "/bin")))
431 (install-file "z.sh" bin)
432 (chmod (string-append bin "/z.sh") #o755)
433 (install-file "z.1" man)
434 #t))))))
435 (synopsis "Jump about directories")
436 (description
437 "Tracks your most used directories, based on ``frecency''. After a short
438learning phase, z will take you to the most ``frecent'' directory that matches
439all of the regexes given on the command line in order.")
440 (home-page "https://github.com/rupa/z")
441 (license license:expat)))
442
443(define-public shadowenv
444 (package
445 (name "shadowenv")
446 (version "3.5.1")
447 (source
448 (origin
449 (method git-fetch)
450 (uri (git-reference
451 (url "https://github.com/Shopify/shadowenv")
452 (commit version)))
453 (file-name (git-file-name name version))
454 (sha256
455 (base32 "1lyf1anvr7kkvchxh80dk974pamcc5v2vh1j2024s5x39yvhxfyl"))))
456 (build-system cargo-build-system)
457 (arguments
458 (list
459 #:install-source? #f
460 #:imported-modules
461 (append %cargo-build-system-modules
462 %copy-build-system-modules)
463 #:modules
464 '((guix build cargo-build-system)
465 ((guix build copy-build-system) #:prefix copy:)
466 (guix build utils))
467 #:phases
468 #~(modify-phases %standard-phases
469 (add-before 'check 'set-home
470 ;; Tests require a writable HOME.
471 (lambda _
472 (setenv "HOME" "/tmp")))
473 (add-after 'install 'install-manpages
474 (lambda args
475 (apply (assoc-ref copy:%standard-phases 'install)
476 #:install-plan
477 '(("man" "share/"))
478 args))))))
479 (inputs (cargo-inputs 'shadowenv))
480 (home-page "https://shopify.github.io/shadowenv/")
481 (synopsis "Reversible directory-local environment variable manipulations")
482 (description
483 "Shadowenv is a project-local environment variable manager. It
484manipulates the environment by scanning @file{.shadowenv.d/} directories and
485loading any @file{*.lisp} files written in Shadowlisp, a domain-specific
486LISP-1 dialect.")
487 (license license:expat)))
488
489(define-public shfmt
490 (package
491 (name "shfmt")
492 (version "3.12.0")
493 (source
494 (origin
495 (method git-fetch)
496 (uri (git-reference
497 (url "https://github.com/mvdan/sh")
498 (commit (string-append "v" version))))
499 (file-name (git-file-name name version))
500 (sha256
501 (base32 "11rlx3l37aspd9674xdisw394bdly0yb38asqxaz4riadgj0vbfx"))
502 (modules '((guix build utils)))
503 (snippet
504 #~(begin
505 ;; It fails during check phase, looks like a MVP: gosh is a proof
506 ;; of concept shell built on top of [interp].
507 (delete-file-recursively "cmd/gosh")))))
508 (build-system go-build-system)
509 (arguments
510 (list
511 #:install-source? #f
512 #:import-path "mvdan.cc/sh/v3/cmd/shfmt"
513 #:unpack-path "mvdan.cc/sh/v3"
514 #:test-flags
515 ;; Tests fail for these groups unable to set locale.
516 #~(list "-skip" (string-join
517 (list "FuzzQuote"
518 "TestKillTimeout"
519 "TestParseBashConfirm"
520 "TestParseErrBashConfirm"
521 "TestRunnerRun"
522 "TestRunnerRunConfirm")
523 "|"))
524 #:test-subdirs #~(list "../../...") ;test the whole library
525 #:phases
526 #~(modify-phases %standard-phases
527 (add-after 'unpack 'set-version
528 (lambda* (#:key unpack-path #:allow-other-keys)
529 (with-directory-excursion (string-append "src/" unpack-path)
530 (let ((fixed-version (string-append #$version " (GNU Guix)")))
531 ;; shfmt uses modules to look up the version at runtime;
532 ;; since our build system does not yet support modules,
533 ;; inject the version string here instead
534 (substitute* "cmd/shfmt/main.go"
535 (("version = \"\\(devel\\)\"")
536 (format #f "version = \"~a\"" fixed-version)))
537 (substitute* "cmd/shfmt/testdata/script/flags.txtar"
538 (("devel\\|v3") #$version)))))))))
539 (native-inputs
540 (list go-github-com-creack-pty
541 go-github-com-go-quicktest-qt
542 go-github-com-google-go-cmp
543 go-github-com-google-renameio-v2
544 go-github-com-rogpeppe-go-internal-1.14
545 go-golang-org-x-sys
546 go-golang-org-x-term
547 go-mvdan-cc-editorconfig))
548 (home-page "https://github.com/mvdan/sh")
549 (synopsis "Shell formatter with bash support")
550 (description
551 "This package provides a shell formatter. Supports
552@url{https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html,
553POSIX Shell}, @url{https://www.gnu.org/software/bash/, Bash}, and
554@url{http://www.mirbsd.org/mksh.htm, mksh}.")
555 (license license:bsd-3)))
556
557(define-public starship
558 (package
559 (name "starship")
560 (version "1.26.0")
561 (source
562 (origin
563 (method url-fetch)
564 (uri (crate-uri "starship" version))
565 (file-name (string-append name "-" version ".tar.gz"))
566 (sha256
567 (base32 "15jm2frr3l946drv1lazc9pa8fxpf324zcdwgya2p6h8r0505zv6"))
568 (patches
569 (search-patches "starship-test-timezone-fix.patch"))))
570 (build-system cargo-build-system)
571 (arguments
572 (list
573 #:install-source? #f
574 #:modules
575 '((guix build cargo-build-system)
576 (guix build utils)
577 (ice-9 match))
578 #:phases
579 #~(modify-phases %standard-phases
580 (add-after 'install 'install-completions
581 (lambda* (#:key native-inputs #:allow-other-keys)
582 (for-each
583 (match-lambda
584 ((shell . path)
585 (mkdir-p (in-vicinity #$output (dirname path)))
586 (let ((binary
587 (if #$(%current-target-system)
588 (search-input-file native-inputs "bin/starship")
589 (in-vicinity #$output "bin/starship"))))
590 (with-output-to-file (in-vicinity #$output path)
591 (lambda _
592 (invoke binary "completions" shell))))))
593 '(("bash" . "share/bash-completion/completions/starship")
594 ("elvish" . "share/elvish/lib/starship")
595 ("fish" . "share/fish/vendor_completions.d/starship.fish")
596 ("nushell" . "share/nushell/vendor/autoload/starship")
597 ("zsh" . "share/zsh/site-functions/_starship")))))
598 (add-after 'unpack 'patch-test-shell
599 (lambda* (#:key tests? inputs #:allow-other-keys)
600 ;; Search through the rust files and then replace `/bin/sh'
601 ;; with the full path for the tests.
602 (let ((rust-files (find-files "." "\\.rs$")))
603 (when tests?
604 (for-each (lambda (file)
605 (substitute* file
606 (("/bin/sh")
607 (search-input-file inputs "/bin/sh"))))
608 rust-files)))))
609 ;; Some tests require a writable home directory
610 ;; Set "HOME" to be located inside the cwd so it is writable
611 ;; for tests checking for user-configs
612 (add-before 'check 'set-test-env-vars
613 (lambda _
614 (setenv "HOME"
615 (string-append (getcwd) "/.test-home")))))))
616 (inputs (cargo-inputs 'starship))
617 (native-inputs
618 (append
619 (if (%current-target-system)
620 (list this-package)
621 '())
622 (list git-minimal/pinned)))
623 (home-page "https://starship.rs")
624 (synopsis "Fast and customizable shell prompt")
625 (description
626 "Starship is a shell prompt that is fast and configurable, and works on
627most common shells. It shows information from various sources in a way easy to
628grasp at a glance, including but not limited to: the hostname/username/cwd trio,
629git, project language and runtime.
630
631Note: Users must have a nerd font installed and enabled in their terminal.")
632 (license license:isc)))
633
634(define-public envstore
635 (package
636 (name "envstore")
637 (version "2.1")
638 (source
639 (origin
640 (method url-fetch)
641 (uri (string-append "https://finalrewind.org/projects/"
642 name "/" name "-" version ".tar.bz2"))
643 (sha256
644 (base32 "1x97lxad80m5blhdfanl5v2qzjwcgbij2i23701bn8mpyxsrqszi"))))
645 (build-system gnu-build-system)
646 (arguments
647 `(#:test-target "test"
648 #:make-flags (list "CC=gcc"
649 (string-append "PREFIX=" (assoc-ref %outputs "out")))
650 #:phases
651 (modify-phases %standard-phases
652 (delete 'configure))))
653 (home-page "https://finalrewind.org/projects/envstore/")
654 (synopsis "Save and restore environment variables")
655 (description "Envstore is a program for sharing environment variables
656between various shells or commands.")
657 (license license:wtfpl2)))
658
659(define-public trash-cli
660 (package
661 (name "trash-cli")
662 (version "0.24.5.26")
663 (source
664 (origin
665 (method git-fetch)
666 (uri (git-reference
667 (url "https://github.com/andreafrancia/trash-cli")
668 (commit version)))
669 (file-name (git-file-name name version))
670 (sha256
671 (base32 "1mqs3y9vbph33jsaa5hc0fhk80pklmsn8ylp979k9qj63fgqrnwn"))))
672 (build-system pyproject-build-system)
673 (arguments
674 (list
675 #:modules `((guix build pyproject-build-system)
676 (guix build utils)
677 (ice-9 match))
678 #:phases #~(modify-phases %standard-phases
679 (add-before 'build 'fix-setup.py
680 (lambda* (#:key outputs #:allow-other-keys)
681 (let ((bin (string-append #$output "/bin")))
682 (mkdir-p bin)
683 (substitute* "setup.py"
684 (("add_script\\('")
685 (string-append "add_script('" bin "/"))))))
686 (add-before 'wrap 'install-completions
687 (lambda _
688 (for-each
689 (lambda (binary)
690 (for-each
691 (match-lambda
692 ((shell . path)
693 (mkdir-p (dirname path))
694 (with-output-to-file path
695 (lambda _
696 (invoke
697 (string-append #$output "/bin/" binary)
698 "--print-completion" shell)))))
699 `(("bash" .
700 ,(format ;format string must be literal
701 #f "~a/share/bash-completion/completions/~a"
702 #$output binary))
703 ("zsh" .
704 ,(format #f "~a/share/zsh/site-functions/_~a"
705 #$output binary))
706 ("tcsh" .
707 ,(format #f "~a/etc/profile.d/~a.completion.csh"
708 #$output binary)))))
709 (list "trash"
710 "trash-empty"
711 "trash-list"
712 "trash-put"
713 "trash-restore"
714 "trash-rm")))))))
715 (native-inputs (list python-flexmock
716 python-mock
717 python-parameterized
718 python-pytest
719 python-setuptools
720 python-shtab
721 python-six
722 python-wheel))
723 (inputs (list coreutils))
724 (propagated-inputs (list python-psutil))
725 (home-page "https://github.com/andreafrancia/trash-cli")
726 (synopsis "Trash can management tool")
727 (description
728 "trash-cli is a command line utility for interacting with the
729FreeDesktop.org trash can used by GNOME, KDE, XFCE, and other common desktop
730environments. It can move files to the trash, and remove or list files that
731are already there.")
732 (license license:gpl2+)))
733
734(define-public tran
735 ;; There is no new release yet, but there are some changes in master brunch,
736 ;; see <https://github.com/kilobyte/tran/issues/4>.
737 (let ((commit "039df9529d5dfb8283edfb3c8b3cc16c01f0bfce")
738 (revision "0"))
739 (package
740 (name "tran")
741 ;; The latest upstream version seems to be "v5".
742 (version (git-version "5.0.0" revision commit))
743 (source
744 (origin
745 (method git-fetch)
746 (uri (git-reference
747 (url "https://github.com/kilobyte/tran")
748 (commit commit)))
749 (file-name (string-append name "-" version "-checkout"))
750 (sha256
751 (base32 "1kzr3lfhi5f8wpwjzrzlwkxjv9rasdr9ndjdns9kd16vsh0gl2rd"))))
752 (build-system gnu-build-system)
753 (arguments
754 (list
755 #:tests? #f ;no tests
756 #:phases
757 #~(modify-phases %standard-phases
758 (delete 'configure) ;no configure provided
759 (add-after 'unpack 'patch
760 (lambda _
761 (substitute* "tran"
762 (("my \\$DATA=\"data\"")
763 (format #f "my $DATA=\"~a/share/tran/data\"" #$output)))))
764 (replace 'build
765 (lambda _
766 (invoke "make")))
767 (delete 'strip)
768 (replace 'install
769 (lambda _
770 (install-file "tran" (string-append #$output "/bin/"))
771 (install-file "tran.1" (string-append
772 #$output "/share/man/man1/"))
773 (copy-recursively "data" (string-append
774 #$output "/share/tran/data/")))))))
775 (inputs (list perl))
776 (home-page "https://github.com/kilobyte/tran")
777 (synopsis "Transcription between character scripts")
778 (description
779 "This tool can transliterate/transcribe text both ways between the
780Latin script and other languages.")
781 (license license:expat))))
782
783(define-public direnv
784 (package
785 (name "direnv")
786 (version "2.37.1")
787 (source
788 (origin (method git-fetch)
789 (uri (git-reference
790 (url "https://github.com/direnv/direnv")
791 (commit (string-append "v" version))))
792 (file-name (git-file-name name version))
793 (sha256
794 (base32
795 "08wywbj5niqhpy6m4y8xw065w3rgpi8khfy5qzqfxr6752h66v7p"))))
796 (build-system go-build-system)
797 (arguments
798 (list #:install-source? #f
799 #:import-path "github.com/direnv/direnv"
800 #:phases
801 #~(modify-phases %standard-phases
802 (add-after 'install 'install-manpages
803 (lambda _
804 (let* ((man (string-append #$output "/share/man/man1")))
805 (mkdir-p man)
806 (with-directory-excursion "src/github.com/direnv/direnv"
807 (install-file "man/direnv.1" man)
808 (install-file "man/direnv-stdlib.1" man)
809 (install-file "man/direnv.toml.1" man)))))
810 (replace 'check
811 (lambda* (#:key tests? #:allow-other-keys)
812 (when tests?
813 (setenv "HOME" "/tmp")
814 (with-directory-excursion "src/github.com/direnv/direnv"
815 ;; The following file needs to be writable so it can be
816 ;; modified by the testsuite.
817 (make-file-writable "test/scenarios/base/.envrc")
818 ;; We need to manually run test because make test
819 ;; tries to use go modules
820 (invoke "go" "test" "./...")
821 ;; Clean up from the tests, especially so that the extra
822 ;; direnv executable that's generated is removed.
823 (invoke "make" "clean"))))))))
824 (native-inputs
825 (list go-github-com-burntsushi-toml
826 go-github-com-mattn-go-isatty
827 go-golang-org-x-mod
828 which))
829 (home-page "https://direnv.net/")
830 (synopsis "Environment switcher for the shell")
831 (description
832 "direnv can hook into the bash, zsh, tcsh, and fish shells to load
833or unload environment variables depending on the current directory. This
834allows project-specific environment variables without using @file{~/.profile}.
835
836Before each prompt, direnv checks for the existence of a @file{.envrc} file in
837the current and parent directories. This file is then used to alter the
838environment variables of the current shell.")
839 (license license:expat)))
840
841(define-public fzy
842 (package
843 (name "fzy")
844 (version "1.0")
845 (source
846 (origin
847 (method git-fetch)
848 (uri (git-reference
849 (url "https://github.com/jhawthorn/fzy")
850 (commit version)))
851 (file-name (git-file-name name version))
852 (sha256
853 (base32
854 "1gkzdvj73f71388jvym47075l9zw61v6l8wdv2lnc0mns6dxig0k"))))
855 (build-system gnu-build-system)
856 (arguments
857 (list #:make-flags
858 #~(list (string-append "CC=" #$(cc-for-target))
859 (string-append "PREFIX=" #$output))
860 #:phases
861 #~(modify-phases %standard-phases
862 (delete 'configure))))
863 (home-page "https://github.com/jhawthorn/fzy")
864 (synopsis "Fast fuzzy text selector for the terminal with an advanced
865scoring algorithm")
866 (description
867 "Most other fuzzy matchers sort based on the length of a match. fzy tries
868to find the result the user intended. It does this by favouring matches on
869consecutive letters and starts of words. This allows matching using acronyms
870or different parts of the path.
871
872fzy is designed to be used both as an editor plugin and on the command
873line. Rather than clearing the screen, fzy displays its interface directly
874below the current cursor position, scrolling the screen if necessary.")
875 (license license:expat)))
876
877(define-public hstr
878 (package
879 (name "hstr")
880 (version "3.1")
881 (source (origin
882 (method git-fetch)
883 (uri (git-reference
884 (url "https://github.com/dvorka/hstr")
885 (commit version)))
886 (file-name (git-file-name name version))
887 (sha256
888 (base32
889 "1w1xr0ddf34i46b8wwz2snf7ap6m0mv53zid3d1l5hc4m3az5qis"))))
890 (build-system gnu-build-system)
891 (arguments
892 `(#:phases
893 (modify-phases %standard-phases
894 (add-before 'build 'adjust-ncurses-includes
895 (lambda* (#:key make-flags outputs #:allow-other-keys)
896 (let ((out (assoc-ref outputs "out")))
897 (substitute* "src/include/hstr_curses.h"
898 (("ncursesw\\/curses.h") "ncurses.h"))
899 (substitute* "src/include/hstr.h"
900 (("ncursesw\\/curses.h") "ncurses.h")))
901 #t)))))
902 (native-inputs
903 (list autoconf automake pkg-config))
904 (inputs
905 (list ncurses readline))
906 (synopsis "Navigate and search command history with shell history suggest box")
907 (description "HSTR (HiSToRy) is a command-line utility that brings
908improved Bash and Zsh command completion from the history. It aims to make
909completion easier and more efficient than with @kbd{Ctrl-R}. It allows you to
910easily view, navigate, and search your command history with suggestion boxes.
911HSTR can also manage your command history (for instance you can remove
912commands that are obsolete or contain a piece of sensitive information) or
913bookmark your favourite commands.")
914 (home-page "https://me.mindforger.com/projects/hh.html")
915 (license license:asl2.0)))
916
917(define-public shell-functools
918 ;; v0.3.0 was released in 2018, there are changes providing fixes to the
919 ;; test suite, use the latest commit.
920 (let ((commit "530e3b6f098c41869f9dc47d1a3005e12ce300c0")
921 (revision "0"))
922 (package
923 (name "shell-functools")
924 (version (git-version "0.3.0" revision commit))
925 (source (origin
926 (method git-fetch)
927 (uri (git-reference
928 (url "https://github.com/sharkdp/shell-functools")
929 (commit commit)))
930 (file-name (git-file-name name version))
931 (sha256
932 (base32
933 "0l23n5anppxds4678qnh84mykbdb7qxyjrxxjzm7kin7izfzczpa"))))
934 (build-system pyproject-build-system)
935 (native-inputs
936 (list python-pytest
937 python-hatchling))
938 (home-page "https://github.com/sharkdp/shell-functools/")
939 (synopsis "Functional programming tools for the shell")
940 (description
941 "This package provides higher order functions like map,filter, foldl,
942sort_by and take_while as simple command-line tools. Following the UNIX
943philosophy, these commands are designed to be composed via pipes. A large
944collection of functions such as basename, replace, contains or is_dir are
945provided as arguments to these commands.")
946 (license license:expat))))
947
948(define-public rig
949 (package
950 (name "rig")
951 (version "1.11")
952 (source (origin
953 (method url-fetch)
954 (uri (string-append "mirror://sourceforge/rig/rig/"
955 version "/rig-"
956 version ".tar.gz"))
957 (sha256
958 (base32
959 "1f3snysjqqlpk2kgvm5p2icrj4lsdymccmn3igkc2f60smqckgq0"))))
960 (build-system gnu-build-system)
961 (arguments `(#:make-flags
962 (list (string-append "CXX=" ,(cxx-for-target))
963 (string-append "PREFIX=" %output))
964 #:phases
965 (modify-phases %standard-phases
966 (delete 'configure)
967 (add-after 'unpack 'fix-build
968 (lambda _
969 (substitute* "rig.cc"
970 (("^#include <string>")
971 "#include <cstring>"))
972 (substitute* "Makefile"
973 (("g\\+\\+")
974 "${CXX} -O2")
975 (("install -g 0 -m 755 -o 0 -s rig \\$\\(BINDIR\\)")
976 "install -m 755 -d $(DESTDIR)$(BINDIR)\n\t\
977install -m 755 rig $(DESTDIR)$(BINDIR)/rig")
978 (("install -g 0 -m 644 -o 0 rig.6 \\$\\(MANDIR\\)/man6/rig.6")
979 "install -m 755 -d $(DESTDIR)$(MANDIR)/man6/\n\t\
980install -m 644 rig.6 $(DESTDIR)$(MANDIR)/man6/rig.6")
981 (("install -g 0 -m 755 -o 0 -d \\$\\(DATADIR\\)")
982 "install -m 755 -d $(DESTDIR)$(DATADIR)")
983 (("install -g 0 -m 644 -o 0 data/\\*.idx \\$\\(DATADIR\\)")
984 "install -m 644 data/*.idx $(DESTDIR)$(DATADIR)")))))
985 #:tests? #f))
986 (home-page "https://rig.sourceforge.net")
987 (synopsis "Random identity generator")
988 (description
989 "RIG (Random Identity Generator) generates random, yet real-looking,
990personal data. It is useful if you need to feed a name to a Web site, BBS, or
991real person, and are too lazy to think of one yourself. Also, if the Web
992site/BBS/person you are giving the information to tries to cross-check the
993city, state, zip, or area code, it will check out.")
994 (license license:gpl2+)))
995
996(define-public conflict
997 (package
998 (name "conflict")
999 (version "20221002")
1000 (source (origin
1001 (method url-fetch)
1002 (uri (string-append
1003 "https://invisible-mirror.net/archives/conflict/conflict-"
1004 version ".tgz"))
1005 (sha256
1006 (base32
1007 "1z6z61yiss9m45m3agqs92l569r55w9nsqaap56kh568mcy3y64c"))))
1008 (build-system gnu-build-system)
1009 (arguments
1010 `(#:phases
1011 (modify-phases %standard-phases
1012 (add-after 'unpack 'fix-paths
1013 (lambda _
1014 (substitute* "run_test.sh"
1015 (("PATH=\".:\\$BIN:/bin\"")
1016 "PATH=\".:$BIN:$PATH\"")))))))
1017 (home-page "https://invisible-island.net/conflict/conflict.html")
1018 (synopsis "Displays conflicting filenames in your execution path")
1019 (description
1020 "@code{conflict} examines the user-specifiable list of programs, looking
1021for instances in the user's path which conflict (i.e., the name appears in
1022more than one point in the path).")
1023 (license (license:x11-style "file://COPYING"))))
1024
1025(define-public renameutils
1026 (package
1027 (name "renameutils")
1028 (version "0.12.0")
1029 (source
1030 (origin
1031 (method url-fetch)
1032 (uri (string-append "mirror://savannah/renameutils/"
1033 "renameutils-" version ".tar.gz"))
1034 (sha256
1035 (base32
1036 "18xlkr56jdyajjihcmfqlyyanzyiqqlzbhrm6695mkvw081g1lnb"))
1037 (modules '((guix build utils)))
1038 (snippet '(begin
1039 (substitute* "src/Makefile.in"
1040 (("\\(\\$bindir\\)") "$(bindir)"))
1041 #t))))
1042 (build-system gnu-build-system)
1043 (inputs
1044 (list readline))
1045 (home-page "https://www.nongnu.org/renameutils/")
1046 (synopsis "File renaming utilities")
1047 (description "The file renaming utilities (renameutils for short) are a
1048set of programs designed to make renaming of files faster and less cumbersome.
1049The file renaming utilities consists of five programs: @command{qmv},
1050@command{qcp}, @command{imv}, @command{icp}, and @command{deurlname}.")
1051 (license license:gpl3+)))
1052
1053(define-public grc
1054 (package
1055 (name "grc")
1056 (version "1.13")
1057 (source
1058 (origin
1059 (method git-fetch)
1060 (uri (git-reference
1061 (url "https://github.com/garabik/grc")
1062 (commit (string-append "v" version))))
1063 (file-name (git-file-name name version))
1064 (sha256
1065 (base32 "1h0h88h484a9796hai0wasi1xmjxxhpyxgixn6fgdyc5h69gv8nl"))))
1066 (build-system gnu-build-system)
1067 (inputs
1068 (list python))
1069 (arguments
1070 (list
1071 #:phases
1072 #~(modify-phases %standard-phases
1073 (delete 'configure)
1074 (replace 'build
1075 (lambda _
1076 (substitute* "grc"
1077 (("conffilenames = \\[.*\\]")
1078 (string-append
1079 "conffilenames = ["
1080 "os.environ.get('GUIX_ENVIRONMENT', '" #$output "') "
1081 "+ '/etc/grc.conf']")))
1082 (substitute* "grcat"
1083 (("conffilepath \\+= \\['/usr/.*\\]")
1084 (string-append
1085 "conffilepath += ["
1086 "os.environ.get('GUIX_ENVIRONMENT', '" #$output "') "
1087 "+ '/share/grc/']"))))) ;; trailing slash!
1088 (delete 'check)
1089 (replace 'install
1090 (lambda _
1091 (invoke "sh" "install.sh" #$output #$output))))))
1092 (home-page "http://kassiopeia.juls.savba.sk/~garabik/software/grc.html")
1093 (synopsis "Generic colouriser for everything")
1094 (description "@code{grc} can be used to colourise logfiles, output of
1095shell commands, arbitrary text, etc. Many shell commands are supported out of
1096the box.
1097
1098You might want to add these lines you your @code{~/.bashrc}:
1099@example
1100GRC_ALIASES=true
1101source ${GUIX_ENVIRONMENT:-$HOME/.guix-profile}/etc/profile.d/grc.sh
1102@end example
1103")
1104 (license license:gpl2)))
1105
1106(define-public liquidprompt
1107 (package
1108 (name "liquidprompt")
1109 (version "2.2.1")
1110 (home-page "https://github.com/liquidprompt/liquidprompt")
1111 (source
1112 (origin
1113 (method git-fetch)
1114 (uri (git-reference
1115 (url "https://github.com/liquidprompt/liquidprompt")
1116 (commit (string-append "v" version))))
1117 (file-name (git-file-name name version))
1118 (sha256
1119 (base32 "1xm3cb2dinn0zqqqya4qz2v8mp8hb6f1mckqvc6npdf8xlcwap35"))))
1120 (build-system copy-build-system)
1121 (arguments
1122 (list
1123 #:install-plan #~'(("example.bashrc" "share/liquidprompt/examples/")
1124 ("liquidprompt" "share/liquidprompt/")
1125 ("contrib" "share/liquidprompt/")
1126 ("templates" "share/liquidprompt/")
1127 ("themes" "share/liquidprompt/")
1128 ("liquidprompt.plugin.zsh"
1129 "share/zsh/plugins/liquidprompt/")
1130 ("docs" #$(string-append "share/doc/" name "-"
1131 version "/")))
1132 #:phases #~(modify-phases %standard-phases
1133 (add-after 'unpack 'fix-plugin
1134 (lambda _
1135 (substitute* "liquidprompt.plugin.zsh"
1136 (("source(.*)$")
1137 (string-append "source "
1138 #$output
1139 "/share/liquidprompt/liquidprompt")))))
1140 (add-after 'fix-plugin 'fix-utils-path
1141 (lambda* (#:key inputs #:allow-other-keys)
1142 (substitute* "liquidprompt"
1143 (("([ (])\\\\?(tput|hostname|cksum|uname|tty|grep)([) ])"
1144 all beginning command ending)
1145 (string-append beginning
1146 (search-input-file
1147 inputs
1148 (string-append "bin/" command))
1149 ending)))))
1150 (add-after 'install 'install-generated-config
1151 (lambda* (#:key outputs #:allow-other-keys)
1152 (let* ((out (assoc-ref outputs "out"))
1153 (etc (string-append out "/etc"))
1154 (config (string-append etc "/liquidpromptrc")))
1155 (mkdir etc)
1156 (with-output-to-file config
1157 (lambda _
1158 (invoke "./tools/config-from-doc.sh")))))))))
1159 (inputs (list ncurses
1160 coreutils
1161 inetutils))
1162 (synopsis "Full-featured prompt for Bash & Zsh")
1163 (description
1164 "Liquidprompt is an adaptive prompt for Bash and Zsh that gives
1165you a nicely displayed prompt with useful information when you need it. It
1166does this with a powerful theming engine and a large array of data sources.
1167
1168In order to use liquidprompt with Zsh, you should use the following snippet
1169with Guix Home:
1170
1171@example
1172(service home-zsh-service-type
1173 (home-zsh-configuration
1174 (zshrc (list ;;...
1175 ;; This loads liquidprompt
1176 (mixed-text-file \"liquidprompt\"
1177 \"[[ $- = *i* ]] && source \" liquidprompt \"/share/liquidprompt/liquidprompt\")
1178 ;; This loads the powerline theme available in liquidprompt
1179 (mixed-text-file \"powerline-theme\"
1180 \"source \" liquidprompt \"/share/liquidprompt/themes/powerline/powerline.theme\"))))))
1181@end example\n")
1182 (license license:agpl3+)))
1183
1184(define-public fzf-tab
1185 (package
1186 (name "fzf-tab")
1187 (version "1.1.2")
1188 (home-page "https://github.com/Aloxaf/fzf-tab")
1189 (source (origin
1190 (method git-fetch)
1191 (uri (git-reference
1192 (url "https://github.com/Aloxaf/fzf-tab")
1193 (commit (string-append "v" version))))
1194 (file-name (git-file-name name version))
1195 (sha256
1196 (base32
1197 "061jjpgghn8d5q2m2cd2qdjwbz38qrcarldj16xvxbid4c137zs2"))))
1198 (build-system copy-build-system)
1199 (arguments
1200 '(#:install-plan '(("lib" "/share/zsh/plugins/fzf-tab/")
1201 ("modules" "/share/zsh/plugins/fzf-tab/")
1202 ("fzf-tab.plugin.zsh" "/share/zsh/plugins/fzf-tab/")
1203 ("fzf-tab.zsh" "/share/zsh/plugins/fzf-tab/")
1204 ("README.md" "/share/doc/fzf-tab/"))))
1205 (synopsis "Replace the zsh default completion menu with fzf")
1206 (description
1207 "The fzf-tab package replaces the default completion menu of the zsh
1208shell with fzf, enabling fuzzy finding and multi-selection.")
1209 (license license:expat)))
1210
1211(define-public pay-respects
1212 (package
1213 (name "pay-respects")
1214 (version "0.7.12")
1215 (source
1216 (origin
1217 (method url-fetch)
1218 (uri (crate-uri "pay-respects" version))
1219 (file-name (string-append name "-" version ".tar.gz"))
1220 (sha256
1221 (base32 "0nmh5kkjhsrmhwlb09wvg6chzpl7w7xq1qr1yy9gc202yrv6cnmk"))))
1222 (build-system cargo-build-system)
1223 (arguments
1224 (list
1225 #:install-source? #f
1226 #:modules
1227 '((guix build cargo-build-system)
1228 (guix build utils)
1229 (ice-9 match))
1230 #:phases
1231 #~(modify-phases %standard-phases
1232 (add-after 'install 'install-completions
1233 (lambda* (#:key native-inputs #:allow-other-keys)
1234 (for-each
1235 (match-lambda
1236 ((shell . path)
1237 (mkdir-p (in-vicinity #$output (dirname path)))
1238 (let ((binary
1239 (if #$(%current-target-system)
1240 (search-input-file native-inputs "bin/pay-respects")
1241 (in-vicinity #$output "bin/pay-respects"))))
1242 (with-output-to-file (in-vicinity #$output path)
1243 (lambda _
1244 (invoke binary shell)))
1245 ;; The shell completions call the binary so we make sure
1246 ;; that we call the correct binary.
1247 (when #$(%current-target-system)
1248 (substitute* (in-vicinity #$output path)
1249 (((search-input-file native-inputs "bin/pay-respects"))
1250 (in-vicinity #$output "bin/pay-respects")))))))
1251 '(("bash" . "share/bash-completion/completions/pay-respects")
1252 ("fish" . "share/fish/vendor_completions.d/pay-respects.fish")
1253 ("nushell" . "share/nushell/vendor/autoload/pay-respects")
1254 ("zsh" . "share/zsh/site-functions/_pay-respects"))))))))
1255 (native-inputs
1256 (if (%current-target-system)
1257 (list this-package)
1258 '()))
1259 (inputs (cargo-inputs 'pay-respects))
1260 (home-page "https://codeberg.org/iff/pay-respects")
1261 (synopsis "Suggest correction for mistyped console commands")
1262 (description
1263 "@command{pay-respects} provides a shell helper to suggest correction for
1264mistyped commands, with @command{guix locate} integration and an alias (default
1265to @command{f}) to correct the previous command.")
1266 (license license:agpl3+)))