1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
3 ;;; Copyright © 2014, 2015 David Thompson <davet@gnu.org>
4 ;;; Copyright © 2014 Kevin Lemonnier <lemonnierk@ulrar.net>
5 ;;; Copyright © 2015 Jeff Mickey <j@codemac.net>
6 ;;; Copyright © 2016–2021 Tobias Geerinckx-Rice <me@tobias.gr>
7 ;;; Copyright © 2016 Stefan Reichör <stefan@xsteve.at>
8 ;;; Copyright © 2017, 2018 Ricardo Wurmus <rekado@elephly.net>
9 ;;; Copyright © 2017, 2018 Nikita <nikita@n0.is>
10 ;;; Copyright © 2017, 2018 Leo Famulari <leo@famulari.name>
11 ;;; Copyright © 2017 Arun Isaac <arunisaac@systemreboot.net>
12 ;;; Copyright © 2019 Meiyo Peng <meiyo.peng@gmail.com>
13 ;;; Copyright © 2019 Timothy Sample <samplet@ngyro.com>
14 ;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
15 ;;; Copyright © 2019, 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
16 ;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
17 ;;; Copyright © 2020 Ryan Prior <rprior@protonmail.com>
18 ;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il>
19 ;;; Copyright © 2021 Nicolas Goaziou <mail@nicolasgoaziou.fr>
21 ;;; This file is part of GNU Guix.
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.
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.
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/>.
36 (define-module (gnu packages shells)
37 #:use-module (gnu packages)
38 #:use-module (gnu packages autotools)
39 #:use-module (gnu packages base)
40 #:use-module (gnu packages bash)
41 #:use-module (gnu packages bison)
42 #:use-module (gnu packages crates-graphics)
43 #:use-module (gnu packages crates-io)
44 #:use-module (gnu packages documentation)
45 #:use-module (gnu packages groff)
46 #:use-module (gnu packages guile)
47 #:use-module (gnu packages libbsd)
48 #:use-module (gnu packages libedit)
49 #:use-module (gnu packages linux)
50 #:use-module (gnu packages ncurses)
51 #:use-module (gnu packages pcre)
52 #:use-module (gnu packages perl)
53 #:use-module (gnu packages pkg-config)
54 #:use-module (gnu packages python)
55 #:use-module (gnu packages python-xyz)
56 #:use-module (gnu packages readline)
57 #:use-module (gnu packages scheme)
58 #:use-module (guix build-system cargo)
59 #:use-module (guix build-system cmake)
60 #:use-module (guix build-system gnu)
61 #:use-module (guix build-system python)
62 #:use-module (guix build-system trivial)
63 #:use-module (guix download)
64 #:use-module (guix git-download)
65 #:use-module (guix licenses)
66 #:use-module (guix packages)
67 #:use-module (guix utils))
76 (uri (string-append "http://gondor.apana.org.au/~herbert/dash/files/"
77 "dash-" version ".tar.gz"))
79 (base32 "0amwphfal2rnfa63f7qd4i9m4ckv0gm3j6jlxkmfi9x6ddkz3fb2"))
80 (modules '((guix build utils)))
83 ;; The man page hails from BSD, where (d)ash is the default shell.
84 ;; This isn't the case on Guix or indeed most other GNU systems.
85 (substitute* "src/dash.1"
86 (("the standard command interpreter for the system")
87 "a command interpreter based on the original Bourne shell"))
89 (build-system gnu-build-system)
91 `(("libedit" ,libedit)))
93 '(#:configure-flags '("--with-libedit")))
94 (home-page "http://gondor.apana.org.au/~herbert/dash")
95 (synopsis "POSIX-compliant shell optimised for size")
97 "dash is a POSIX-compliant @command{/bin/sh} implementation that aims to be
98 as small as possible, often without sacrificing speed. It is faster than the
99 GNU Bourne-Again Shell (@command{bash}) at most scripted tasks. dash is a
100 direct descendant of NetBSD's Almquist Shell (@command{ash}).")
102 gpl2+)))) ; mksignames.c
111 (uri (string-append "https://github.com/fish-shell/fish-shell/"
112 "releases/download/" version "/"
113 "fish-" version ".tar.gz"))
115 (base32 "1vblmb3x2k2cb0db5jdyflppnlqsm7i6jjaidyhmvaaw7ch2gffm"))
116 (modules '((guix build utils)))
119 (delete-file-recursively "pcre2-10.32") #t))))
120 (build-system cmake-build-system)
122 `(("fish-foreign-env" ,fish-foreign-env)
124 ("pcre2" ,pcre2) ; don't use the bundled PCRE2
125 ("python" ,python))) ; for fish_config and manpage completions
127 `(("doxygen" ,doxygen)
132 (modify-phases %standard-phases
133 (add-after 'unpack 'set-env
135 ;; some tests write to $HOME
136 (setenv "HOME" (getcwd))
138 (add-after 'unpack 'patch-tests
139 (lambda* (#:key inputs #:allow-other-keys)
140 (let ((coreutils (assoc-ref inputs "coreutils"))
141 (bash (assoc-ref inputs "bash")))
143 (delete-file "tests/checks/pipeline-pgroup.fish")
144 ;; These try to open a terminal
145 (delete-file "tests/checks/interactive.fish")
146 (delete-file "tests/checks/login-interactive.fish")
147 ;; These contain absolute path references
148 (substitute* "src/fish_tests.cpp"
149 (("/bin/echo" echo) (string-append coreutils echo))
150 (("/bin/ca" ca) (string-append coreutils ca))
151 (("\"(/bin/c)\"" _ c) (string-append "\"" coreutils c "\""))
152 (("/bin/ls_not_a_path" ls-not-a-path)
153 (string-append coreutils ls-not-a-path))
154 (("/bin/ls" ls) (string-append coreutils ls))
155 (("(/bin/)\"" _ bin) (string-append coreutils bin "\""))
156 (("/bin -" bin) (string-append coreutils bin))
158 "do_test\\(is_potential_path\\("
159 "L\"/usr\", wds, vars, PATH_REQUIRE_DIR\\)\\);"))
162 (append (find-files "tests" ".*\\.(in|out|err)$")
163 (find-files "tests/checks" ".*\\.fish"))
164 (("/bin/pwd" pwd) (string-append coreutils pwd))
165 (("/bin/echo" echo) (string-append coreutils echo))
166 (("/bin/sh" sh) (string-append bash sh))
167 (("/bin/ls" ls) (string-append coreutils ls)))
168 (substitute* (find-files "tests" ".*\\.(in|out|err)$")
169 (("/usr/bin") (string-append coreutils "/bin")))
171 ;; Source /etc/fish/config.fish from $__fish_sysconf_dir/config.fish.
172 (add-after 'patch-tests 'patch-fish-config
174 (let ((port (open-file "etc/config.fish" "a")))
175 (display (string-append
177 "# Patched by Guix.\n"
178 "# Source /etc/fish/config.fish.\n"
179 "if test -f /etc/fish/config.fish\n"
180 " source /etc/fish/config.fish\n"
185 ;; Embed absolute paths.
186 (add-before 'install 'embed-absolute-paths
188 (substitute* "share/functions/__fish_print_help.fish"
189 (("nroff") (which "nroff")))
191 ;; Enable completions, functions and configurations in user's and
192 ;; system's guix profiles by adding them to __extra_* variables.
193 (add-before 'install 'patch-fish-extra-paths
195 (let ((port (open-file "share/__fish_build_paths.fish" "a")))
199 "# Patched by Guix.\n"
200 "# Enable completions, functions and configurations in user's"
201 " and system's guix profiles by adding them to __extra_*"
203 "set -l __guix_profile_paths ~/.guix-profile"
204 " /run/current-system/profile\n"
205 "set __extra_completionsdir"
206 " $__guix_profile_paths\"/etc/fish/completions\""
207 " $__guix_profile_paths\"/share/fish/vendor_completions.d\""
208 " $__extra_completionsdir\n"
209 "set __extra_functionsdir"
210 " $__guix_profile_paths\"/etc/fish/functions\""
211 " $__guix_profile_paths\"/share/fish/vendor_functions.d\""
212 " $__extra_functionsdir\n"
213 "set __extra_confdir"
214 " $__guix_profile_paths\"/etc/fish/conf.d\""
215 " $__guix_profile_paths\"/share/fish/vendor_conf.d\""
216 " $__extra_confdir\n")
220 ;; Use fish-foreign-env to source /etc/profile.
221 (add-before 'install 'source-etc-profile
222 (lambda* (#:key inputs #:allow-other-keys)
223 (let ((port (open-file "share/__fish_build_paths.fish" "a")))
227 "# Patched by Guix.\n"
228 "# Use fish-foreign-env to source /etc/profile.\n"
229 "if status is-login\n"
230 " set fish_function_path "
231 (assoc-ref inputs "fish-foreign-env") "/share/fish/functions"
232 " $__fish_datadir/functions\n"
233 " fenv source /etc/profile\n"
234 " set -e fish_function_path\n"
239 (synopsis "The friendly interactive shell")
241 "Fish (friendly interactive shell) is a shell focused on interactive use,
242 discoverability, and friendliness. Fish has very user-friendly and powerful
243 tab-completion, including descriptions of every completion, completion of
244 strings with wildcards, and many completions for specific commands. It also
245 has extensive and discoverable help. A special @command{help} command gives
246 access to all the fish documentation in your web browser. Other features
247 include smart terminal handling based on terminfo, an easy to search history,
248 and syntax highlighting.")
249 (home-page "https://fishshell.com/")
252 (define-public fish-foreign-env
254 (name "fish-foreign-env")
255 (version "0.20190116")
260 (url "https://github.com/oh-my-fish/plugin-foreign-env")
261 (commit "dddd9213272a0ab848d474d0cbde12ad034e65bc")))
262 (file-name (git-file-name name version))
264 (base32 "00xqlyl3lffc5l0viin1nyp819wf81fncqyz87jx8ljjdhilmgbs"))))
265 (build-system trivial-build-system)
267 '(#:modules ((guix build utils))
270 (use-modules (guix build utils))
271 (let* ((source (assoc-ref %build-inputs "source"))
272 (out (assoc-ref %outputs "out"))
273 (func-path (string-append out "/share/fish/functions")))
275 (copy-recursively (string-append source "/functions")
278 ;; Embed absolute paths.
279 (substitute* `(,(string-append func-path "/fenv.fish")
280 ,(string-append func-path "/fenv.apply.fish")
281 ,(string-append func-path "/fenv.main.fish"))
283 (string-append (assoc-ref %build-inputs "bash") "/bin/bash"))
285 (string-append (assoc-ref %build-inputs "sed") "/bin/sed"))
287 (string-append " " (assoc-ref %build-inputs "coreutils")
291 ("coreutils" ,coreutils)
293 (home-page "https://github.com/oh-my-fish/plugin-foreign-env")
294 (synopsis "Foreign environment interface for fish shell")
295 (description "@code{fish-foreign-env} wraps bash script execution in a way
296 that environment variables that are exported or modified get imported back
307 (url "https://github.com/rakitzis/rc")
308 (commit (string-append "v" version))))
311 "0vj1h4pcg13vxsiydmmk87dr2sra9h4gwx0c4q6fjsiw4in78rrd"))
312 (file-name (git-file-name name version))))
313 (build-system gnu-build-system)
318 (modify-phases %standard-phases
319 (add-before 'bootstrap 'patch-trip.rc
321 (substitute* "trip.rc"
322 (("/bin/pwd") (which "pwd"))
323 (("/bin/sh") (which "sh"))
324 (("/bin/rm") (which "rm"))
325 (("/bin\\)") (string-append (dirname (which "rm")) ")")))
327 (inputs `(("readline" ,readline)
329 (native-inputs `(("autoconf" ,autoconf)
330 ("automake" ,automake)
332 ("pkg-config" ,pkg-config)))
333 (synopsis "Alternative implementation of the rc shell by Byron Rakitzis")
335 "This is a reimplementation by Byron Rakitzis of the Plan 9 shell. It
336 has a small feature set similar to a traditional Bourne shell.")
337 (home-page "https://github.com/rakitzis/rc")
347 (uri (string-append "https://github.com/wryun/es-shell/releases/"
348 "download/v" version "/es-" version ".tar.gz"))
351 "1fplzxc6lncz2lv2fyr2ig23rgg5j96rm2bbl1rs28mik771zd5h"))
352 (file-name (string-append name "-" version ".tar.gz"))))
353 (build-system gnu-build-system)
355 `(#:test-target "test"
357 (modify-phases %standard-phases
358 (add-before 'configure 're-enter-rootdir
359 ;; The tarball has no folder.
363 `(("readline" ,readline)))
366 (synopsis "Extensible shell with higher-order functions")
368 "Es is an extensible shell. The language was derived from the Plan 9
369 shell, rc, and was influenced by functional programming languages, such as
370 Scheme, and the Tcl embeddable programming language. This implementation is
371 derived from Byron Rakitzis's public domain implementation of rc, and was
372 written by Paul Haahr and Byron Rakitzis.")
373 (home-page "https://wryun.github.io/es-shell/")
374 (license public-domain)))
382 ;; Old tarballs are moved to old/.
383 (uri (list (string-append "ftp://ftp.astron.com/pub/tcsh/"
384 "tcsh-" version ".tar.gz")
385 (string-append "ftp://ftp.astron.com/pub/tcsh/"
386 "old/tcsh-" version ".tar.gz")))
389 "0nw8prz1n0lmr82wnpyhrzmki630afn7p9cfgr3vl00vr9c72a7d"))
390 (patches (search-patches "tcsh-fix-autotest.patch"))
391 (patch-flags '("-p0"))))
392 (build-system gnu-build-system)
394 `(("autoconf" ,autoconf)
397 `(("ncurses" ,ncurses)))
400 (modify-phases %standard-phases
401 ,@(if (%current-target-system)
402 '((add-before 'configure 'set-cross-cc
404 (substitute* "configure"
405 (("CC_FOR_GETHOST=\"cc\"")
406 "CC_FOR_GETHOST=\"gcc\""))
409 (add-before 'check 'patch-test-scripts
412 (substitute* '("tests/commands.at" "tests/variables.at")
413 (("/bin/pwd") (which "pwd")))
414 ;; The .at files create shell scripts without shebangs. Erk.
415 (substitute* "tests/commands.at"
416 (("./output.sh") "/bin/sh output.sh"))
417 (substitute* "tests/syntax.at"
418 (("; other_script.csh") "; /bin/sh other_script.csh"))
419 ;; Now, let's generate the test suite and patch it
420 (invoke "make" "tests/testsuite")
422 ;; This file is ISO-8859-1 encoded.
423 (with-fluids ((%default-port-encoding #f))
424 (substitute* "tests/testsuite"
425 (("/bin/sh") (which "sh"))))
427 (add-after 'install 'post-install
428 (lambda* (#:key inputs outputs #:allow-other-keys)
429 (let* ((out (assoc-ref %outputs "out"))
430 (bin (string-append out "/bin")))
431 (with-directory-excursion bin
432 (symlink "tcsh" "csh"))
434 (home-page "https://www.tcsh.org/")
435 (synopsis "Unix shell based on csh")
437 "Tcsh is an enhanced, but completely compatible version of the Berkeley
438 UNIX C shell (csh). It is a command language interpreter usable both as an
439 interactive login shell and a shell script command processor. It includes a
440 command-line editor, programmable word completion, spelling correction, a
441 history mechanism, job control and a C-like syntax.")
450 (uri (list (string-append
451 "https://www.zsh.org/pub/zsh-" version
454 "https://www.zsh.org/pub/old/zsh-" version
458 "09yyaadq738zlrnlh1hd3ycj1mv3q5hh4xl1ank70mjnqm6bbi6w"))))
459 (build-system gnu-build-system)
460 (arguments `(#:configure-flags
463 "--enable-maildir-support"
464 ;; share/zsh/site-functions isn't populated
465 "--disable-site-fndir"
467 "--enable-additional-fpath="
468 "/usr/local/share/zsh/site-functions," ; for foreign OS
469 "/run/current-system/profile/share/zsh/site-functions"))
471 (modify-phases %standard-phases
472 (add-before 'configure 'fix-sh
474 ;; Some of the files are ISO-8859-1 encoded.
475 (with-fluids ((%default-port-encoding #f))
481 "Config/installfns.sh"
483 "Test/E01options.ztst"
484 "Test/A05execution.ztst"
485 "Test/A01grammar.ztst"
486 "Test/A06assign.ztst"
487 "Test/B02typeset.ztst"
488 "Completion/Unix/Command/_init_d"
490 (("/bin/sh") (which "sh"))))))
491 (add-before 'check 'patch-test
493 ;; In Zsh, `command -p` searches a predefined set of
494 ;; paths that don't exist in the build environment. See
495 ;; the assignment of 'path' in Src/init.c'
496 (substitute* "Test/A01grammar.ztst"
497 (("command -pv") "command -v")
498 (("command -p") "command ")
499 (("'command' -p") "'command' "))
501 (native-inputs `(("autoconf" ,autoconf)))
502 (inputs `(("ncurses" ,ncurses)
505 (synopsis "Powerful shell for interactive use and scripting")
506 (description "The Z shell (zsh) is a Unix shell that can be used
507 as an interactive login shell and as a powerful command interpreter
508 for shell scripting. Zsh can be thought of as an extended Bourne shell
509 with a large number of improvements, including some features of bash,
511 (home-page "https://www.zsh.org/")
513 ;; The whole thing is under an MIT/X11-style license, but there's one
514 ;; command, 'Completion/Unix/Command/_darcs', which is under GPLv2+.
524 (uri (pypi-uri "xonsh" version))
526 (base32 "0q1xy0k5mvz4031p4d3y0j7ljpx32rmpk21jy148l6xcss039br0"))
527 (modules '((guix build utils)))
530 ;; Delete bundled PLY.
531 (delete-file-recursively "xonsh/ply")
532 (substitute* "setup.py"
533 (("\"xonsh\\.ply\\.ply\",") ""))
534 ;; Use our properly packaged PLY instead.
535 (substitute* (list "setup.py"
536 "tests/test_lexer.py"
537 "xonsh/__amalgam__.py"
539 "xonsh/parsers/base.py"
541 (("from xonsh\\.ply\\.(.*) import" _ module)
542 (format #f "from ~a import" module))
543 (("from xonsh\\.ply import") "import"))
545 (build-system python-build-system)
547 '(;; TODO Try running run the test suite.
548 ;; See 'requirements-tests.txt' in the source distribution for more
552 `(("python-ply" ,python-ply)))
553 (home-page "https://xon.sh/")
554 (synopsis "Python-ish shell")
556 "Xonsh is a Python-ish, BASHwards-looking shell language and command
557 prompt. The language is a superset of Python 3.4+ with additional shell
558 primitives that you are used to from Bash and IPython. It works on all major
559 systems including Linux, Mac OSX, and Windows. Xonsh is meant for the daily
560 use of experts and novices alike.")
564 (let ((commit "114432435e4eadd54334df6b37fcae505079b49f")
568 (version (string-append "0.0.0-" revision "." (string-take commit 7)))
573 (url "https://github.com/scheme/scsh")
575 (file-name (string-append name "-" version "-checkout"))
578 "1ghk08akiz7hff1pndi8rmgamgcrn2mv9asbss9l79d3c2iaav3q"))))
579 (build-system gnu-build-system)
581 `(#:test-target "test"
583 (modify-phases %standard-phases
584 (add-before 'configure 'replace-rx
585 (lambda* (#:key inputs #:allow-other-keys)
586 (let* ((rx (assoc-ref inputs "scheme48-rx"))
587 (rxpath (string-append rx "/share/scheme48-"
588 ,(package-version scheme48)
590 (delete-file-recursively "rx")
591 (symlink rxpath "rx"))
594 `(("scheme48" ,scheme48)
595 ("scheme48-rx" ,scheme48-rx)))
597 `(("autoconf" ,autoconf)
598 ("automake" ,automake)))
599 (home-page "https://github.com/scheme/scsh")
600 (synopsis "Unix shell embedded in Scheme")
602 "Scsh is a Unix shell embedded in Scheme. Scsh has two main
603 components: a process notation for running programs and setting up pipelines
604 and redirections, and a complete syscall library for low-level access to the
608 (define-public linenoise
609 (let ((commit "2105ce445821381cf1bca87b6d386d4ea88ee20d")
613 (version (string-append "1.0-" revision "." (string-take commit 7)))
618 (url "https://github.com/antirez/linenoise")
620 (file-name (string-append name "-" version "-checkout"))
623 "1z16qwix8z6a40fskdgxsibkqgdrp4q6ncp4n6hnv4r9iihy2d8r"))))
624 (build-system gnu-build-system)
626 `(#:tests? #f ; no tests are included
628 (list ,(string-append "CC=" (cc-for-target)))
630 (modify-phases %standard-phases
633 (lambda* (#:key outputs #:allow-other-keys)
634 ;; At the moment there is no 'make install' in upstream.
635 (let* ((out (assoc-ref outputs "out")))
636 (install-file "linenoise.h"
637 (string-append out "/include/linenoise"))
638 (install-file "linenoise.c"
639 (string-append out "/include/linenoise"))
641 (home-page "https://github.com/antirez/linenoise")
642 (synopsis "Minimal zero-config readline replacement")
644 "Linenoise is a minimal, zero-config, readline replacement.
645 Its features include:
648 @item Single and multi line editing mode with the usual key bindings
649 @item History handling
651 @item Hints (suggestions at the right of the prompt as you type)
652 @item A subset of VT100 escapes, ANSI.SYS compatible
656 (define-public s-shell
657 (let ((commit "da2e5c20c0c5f477ec3426dc2584889a789b1659")
661 (version (git-version "0.0.0" revision commit))
666 (url "https://github.com/rain-1/s")
668 (file-name (string-append name "-" version "-checkout"))
671 "0qiny71ww5nhzy4mnc8652hn0mlxyb67h333gbdxp4j4qxsi13q4"))))
672 (build-system gnu-build-system)
674 `(("linenoise" ,linenoise)))
677 #:make-flags (list "CC=gcc"
678 (string-append "PREFIX="
679 (assoc-ref %outputs "out")))
681 (modify-phases %standard-phases
682 (add-after 'unpack 'install-directory-fix
683 (lambda* (#:key outputs #:allow-other-keys)
684 (let* ((out (assoc-ref outputs "out"))
685 (bin (string-append out "/bin")))
686 (substitute* "Makefile"
689 (add-after 'install 'manpage
690 (lambda* (#:key outputs #:allow-other-keys)
691 (install-file "s.1" (string-append (assoc-ref outputs "out")
692 "/share/man/man1"))))
694 (lambda* (#:key inputs outputs #:allow-other-keys)
695 ;; At this point linenoise is meant to be included,
696 ;; so we have to really copy it into the working directory
698 (let* ((linenoise (assoc-ref inputs "linenoise"))
699 (noisepath (string-append linenoise "/include/linenoise"))
700 (out (assoc-ref outputs "out")))
701 (copy-recursively noisepath "linenoise")
703 (("/bin/s") (string-append out "/bin/s")))
705 (home-page "https://github.com/rain-1/s")
706 (synopsis "Extremely minimal shell with the simplest syntax possible")
708 "S is a new shell that aims to be extremely simple. It does not
709 implement the POSIX shell standard.
711 There are no globs or \"splatting\" where a variable $FOO turns into multiple
712 command line arguments. One token stays one token forever.
713 This is a \"no surprises\" straightforward approach.
715 There are no redirection operators > in the shell language, they are added as
716 extra programs. > is just another unix command, < is essentially cat(1).
717 A @code{andglob} program is also provided along with s.")
727 (uri (string-append "https://connochaetos.org/oksh/oksh-"
731 "0ln9yf6pxngsviqszv8klnnvn8vcpplvj1njdn8xr2y8frkbw8r3"))))
732 (build-system gnu-build-system)
734 `(; The test files are not part of the distributed tarball.
736 (home-page "https://connochaetos.org/oksh")
737 (synopsis "Port of OpenBSD Korn Shell")
739 "Oksh is a port of the OpenBSD Korn Shell.
740 The OpenBSD Korn Shell is a cleaned up and enhanced ksh.")
751 (url "https://github.com/dimkr/loksh")
753 (file-name (git-file-name name version))
755 (base32 "1a8s64n97ikvvi7ckirxnnjvcmhr3dd4rnqm2ivapyzb0wp42jk7"))))
756 (build-system gnu-build-system)
759 ("ncurses" ,ncurses)))
761 `(("pkg-config" ,pkg-config)))
763 `(#:tests? #f ; no tests included
764 #:make-flags (list "CC=gcc" "HAVE_LIBBSD=1"
765 (string-append "PREFIX="
766 (assoc-ref %outputs "out")))
768 (modify-phases %standard-phases
769 (delete 'configure)))) ; no configure script
770 (home-page "https://github.com/dimkr/loksh")
771 (synopsis "Korn Shell from OpenBSD")
773 "loksh is a Linux port of OpenBSD's @command{ksh}. It is a small,
774 interactive POSIX shell targeted at resource-constrained systems.")
775 ;; The file 'LEGAL' says it is the public domain, and the 2
776 ;; exceptions which are listed are not included in this port.
777 (license public-domain)))
786 (uri (string-append "https://www.mirbsd.org/MirOS/dist/mir/mksh/mksh-R"
789 (base32 "1337zjvzh14yncg9igdry904a3ns52l8rnm1kcq262w7f5xyp2v0"))))
790 (build-system gnu-build-system)
792 `(#:tests? #f ; tests require access to /dev/tty
794 (modify-phases %standard-phases
799 (invoke (which "sh") "Build.sh")))
801 (lambda* (#:key outputs #:allow-other-keys)
802 (let* ((out (assoc-ref outputs "out"))
803 (bin (string-append out "/bin"))
804 (man (string-append out "/share/man/man1")))
805 (install-file "mksh" bin)
806 (with-directory-excursion bin
807 (symlink "mksh" "ksh"))
808 (install-file "mksh.1" man)
810 (home-page "https://www.mirbsd.org/mksh.htm")
811 (synopsis "Korn Shell from MirBSD")
812 (description "mksh is an actively developed free implementation of the
813 Korn Shell programming language and a successor to the Public Domain Korn
825 (uri (string-append "https://www.oilshell.org/download/oil-"
828 (base32 "0yxd020jkwhhvq2l8hd9npp2vn6fvm11f0izfzwdl2npbnc976jr"))))
829 (build-system gnu-build-system)
831 `(#:strip-binaries? #f ; strip breaks the binary
833 (modify-phases %standard-phases
835 (lambda* (#:key outputs #:allow-other-keys)
836 (let ((out (assoc-ref outputs "out")))
837 (setenv "CC" ,(cc-for-target))
838 (substitute* "configure"
840 (invoke "./configure" (string-append "--prefix=" out)
841 "--with-readline"))))
843 ;; The tests are not distributed in the tarballs but upstream
844 ;; recommends running this smoke test.
845 ;; https://github.com/oilshell/oil/blob/release/0.8.0/INSTALL.txt#L38-L48
847 (let* ((oil "_bin/oil.ovm"))
848 (invoke/quiet oil "osh" "-c" "echo hi")
849 (invoke/quiet oil "osh" "-n" "configure")))))))
851 `(("readline" ,readline)))
852 (home-page "https://www.oilshell.org")
853 (synopsis "Programming language and Bash-compatible Unix shell")
854 (description "Oil is a programming language with automatic translation for
855 Bash. It includes osh, a Unix/POSIX shell that runs unmodified Bash
857 (license (list psfl ; tarball includes python2.7
860 (define-public oil-shell
861 (deprecated-package "oil-shell" oil))
868 (origin (method url-fetch)
869 (uri (string-append "mirror://savannah/gash/gash-"
873 "13m0yz5h9nj3x40mr6wr5xcpq1lscndfwcicw3skrz801025hhgf"))
874 (modules '((guix build utils)))
877 ;; Allow builds with Guile 3.0.
878 (substitute* "configure"
879 (("search=\"2\\.2 2\\.0\"")
880 "search=\"3.0 2.2 2.0\""))
882 (build-system gnu-build-system)
884 `(("pkg-config" ,pkg-config)))
886 `(("guile" ,guile-3.0)))
888 '(#:make-flags '("XFAIL_TESTS=tests/redirects.org")))
889 (home-page "https://savannah.nongnu.org/projects/gash/")
890 (synopsis "POSIX-compatible shell written in Guile Scheme")
891 (description "Gash is a POSIX-compatible shell written in Guile
892 Scheme. It provides both the shell interface, as well as a Guile
893 library for parsing shell scripts. Gash is designed to bootstrap Bash
894 as part of the Guix bootstrap process.")
897 (define-public gash-utils
903 (uri (string-append "mirror://savannah/gash/gash-utils-"
907 "0ib2p52qmbac5n0s5bys4fiwim461ps546976l1n7pwbs0avh7fk"))
908 (patches (search-patches "gash-utils-ls-test.patch"))
909 (modules '((guix build utils)))
912 ;; Allow builds with Guile 3.0.
913 (substitute* "configure"
914 (("search=\"2\\.2 2\\.0\"")
915 "search=\"3.0 2.2 2.0\""))
917 (build-system gnu-build-system)
919 `(("pkg-config" ,pkg-config)))
921 `(("guile" ,guile-3.0)
923 (home-page "https://savannah.nongnu.org/projects/gash/")
924 (synopsis "Core POSIX utilities written in Guile Scheme")
925 (description "Gash-Utils provides Scheme implementations of many
926 common POSIX utilities (there are about 40 of them, ranging in
927 complexity from @command{false} to @command{awk}). The utilities are
928 designed to be capable of bootstrapping their standard GNU counterparts.
929 Underpinning these utilities are many Scheme interfaces for manipulating
933 (define-public rust-nu-data-0.26
935 (name "rust-nu-data")
940 (uri (crate-uri "nu-data" version))
941 (file-name (string-append name "-" version ".tar.gz"))
943 (base32 "1jmicfs49laczgvif5axv2gb0c52hrfxvf3ywi7iinr7n8h1sfpx"))))
944 (build-system cargo-build-system)
948 (("rust-ansi-term" ,rust-ansi-term-0.12)
949 ("rust-bigdecimal" ,rust-bigdecimal-0.2)
950 ("rust-byte-unit" ,rust-byte-unit-4)
951 ("rust-chrono" ,rust-chrono-0.4)
952 ("rust-derive-new" ,rust-derive-new-0.5)
953 ("rust-directories-next" ,rust-directories-next-2)
954 ("rust-dirs-next" ,rust-dirs-next-2)
955 ("rust-getset" ,rust-getset-0.1)
956 ("rust-indexmap" ,rust-indexmap-1)
957 ("rust-log" ,rust-log-0.4)
958 ("rust-nu-errors" ,rust-nu-errors-0.26)
959 ("rust-nu-protocol" ,rust-nu-protocol-0.26)
960 ("rust-nu-source" ,rust-nu-source-0.26)
961 ("rust-nu-table" ,rust-nu-table-0.26)
962 ("rust-nu-test-support" ,rust-nu-test-support-0.26)
963 ("rust-nu-value-ext" ,rust-nu-value-ext-0.26)
964 ("rust-num-bigint" ,rust-num-bigint-0.3)
965 ("rust-num-format" ,rust-num-format-0.4)
966 ("rust-num-traits" ,rust-num-traits-0.2)
967 ("rust-parking-lot" ,rust-parking-lot-0.11)
968 ("rust-query-interface" ,rust-query-interface-0.3)
969 ("rust-serde" ,rust-serde-1)
970 ("rust-toml" ,rust-toml-0.5)
971 ("rust-users" ,rust-users-0.10))))
972 (home-page "https://www.nushell.sh")
973 (synopsis "CLI for nushell")
974 (description "CLI for nushell")
977 (define-public rust-nu-errors-0.26
979 (name "rust-nu-errors")
984 (uri (crate-uri "nu-errors" version))
985 (file-name (string-append name "-" version ".tar.gz"))
987 (base32 "0q6cbb02m9cfvjc7fcfzj814iz9ab2j2m3c3qwqskkrig4cwz3sl"))))
988 (build-system cargo-build-system)
992 (("rust-ansi-term" ,rust-ansi-term-0.12)
993 ("rust-bigdecimal" ,rust-bigdecimal-0.2)
994 ("rust-codespan-reporting" ,rust-codespan-reporting-0.11)
995 ("rust-derive-new" ,rust-derive-new-0.5)
996 ("rust-getset" ,rust-getset-0.1)
997 ("rust-glob" ,rust-glob-0.3)
998 ("rust-nu-source" ,rust-nu-source-0.26)
999 ("rust-num-bigint" ,rust-num-bigint-0.3)
1000 ("rust-num-traits" ,rust-num-traits-0.2)
1001 ("rust-serde" ,rust-serde-1)
1002 ("rust-serde-json" ,rust-serde-json-1)
1003 ("rust-serde-yaml" ,rust-serde-yaml-0.8)
1004 ("rust-toml" ,rust-toml-0.5))))
1005 (home-page "https://www.nushell.sh")
1006 (synopsis "Core error subsystem for Nushell")
1007 (description "Core error subsystem for Nushell")
1010 (define-public rust-nu-json-0.26
1012 (name "rust-nu-json")
1017 (uri (crate-uri "nu-json" version))
1018 (file-name (string-append name "-" version ".tar.gz"))
1020 (base32 "085k9p41pqzivw6z6rxxzr8haagwqi795a2dh084qs99cyi5hj2n"))))
1021 (build-system cargo-build-system)
1025 (("rust-lazy-static" ,rust-lazy-static-1)
1026 ("rust-num-traits" ,rust-num-traits-0.2)
1027 ("rust-regex" ,rust-regex-1)
1028 ("rust-serde" ,rust-serde-0.8))))
1029 (home-page "https://www.nushell.sh")
1030 (synopsis "Fork of @code{serde-hjson}")
1031 (description "This package is a fork of @code{serde-hjson}.")
1034 (define-public rust-nu-parser-0.26
1036 (name "rust-nu-parser")
1041 (uri (crate-uri "nu-parser" version))
1042 (file-name (string-append name "-" version ".tar.gz"))
1044 (base32 "05wns7z1xifdlypklar2hb2q9515lrlwx5jl69aw3k877nmwg07p"))))
1045 (build-system cargo-build-system)
1049 (("rust-bigdecimal" ,rust-bigdecimal-0.2)
1050 ("rust-codespan-reporting" ,rust-codespan-reporting-0.11)
1051 ("rust-derive-new" ,rust-derive-new-0.5)
1052 ("rust-derive-is-enum-variant" ,rust-derive-is-enum-variant-0.1)
1053 ("rust-dunce" ,rust-dunce-1)
1054 ("rust-indexmap" ,rust-indexmap-1)
1055 ("rust-log" ,rust-log-0.4)
1056 ("rust-nu-errors" ,rust-nu-errors-0.26)
1057 ("rust-nu-protocol" ,rust-nu-protocol-0.26)
1058 ("rust-nu-source" ,rust-nu-source-0.26)
1059 ("rust-nu-test-support" ,rust-nu-test-support-0.26)
1060 ("rust-num-bigint" ,rust-num-bigint-0.3)
1061 ("rust-num-traits" ,rust-num-traits-0.2)
1062 ("rust-serde" ,rust-serde-1)
1063 ("rust-shellexpand" ,rust-shellexpand-2)
1064 ("rust-smart-default" ,rust-smart-default-0.6))))
1065 (home-page "https://www.nushell.sh")
1066 (synopsis "Nushell parser")
1067 (description "Nushell parser")
1070 (define-public rust-nu-plugin-0.26
1072 (name "rust-nu-plugin")
1077 (uri (crate-uri "nu-plugin" version))
1079 (string-append name "-" version ".tar.gz"))
1081 (base32 "1n7lf9d0dkjdnmwv60szrz22z47aq3yl946f9y20dnk7xy798bv6"))))
1082 (build-system cargo-build-system)
1086 (("rust-bigdecimal" ,rust-bigdecimal-0.2)
1087 ("rust-indexmap" ,rust-indexmap-1)
1088 ("rust-nu-errors" ,rust-nu-errors-0.26)
1089 ("rust-nu-protocol" ,rust-nu-protocol-0.26)
1090 ("rust-nu-source" ,rust-nu-source-0.26)
1091 ("rust-nu-test-support" ,rust-nu-test-support-0.26)
1092 ("rust-nu-value-ext" ,rust-nu-value-ext-0.26)
1093 ("rust-num-bigint" ,rust-num-bigint-0.3)
1094 ("rust-serde" ,rust-serde-1)
1095 ("rust-serde-json" ,rust-serde-json-1))))
1096 (home-page "https://www.nushell.sh")
1097 (synopsis "Nushell Plugin")
1098 (description "Nushell Plugin")
1101 (define-public rust-nu-protocol-0.26
1103 (name "rust-nu-protocol")
1108 (uri (crate-uri "nu-protocol" version))
1109 (file-name (string-append name "-" version ".tar.gz"))
1111 (base32 "1s2lm9aydgcwi0h9jhpi9ba5i55k7iv70fpgl85cm7dlw4kyzjv0"))))
1112 (build-system cargo-build-system)
1116 (("rust-bigdecimal" ,rust-bigdecimal-0.2)
1117 ("rust-byte-unit" ,rust-byte-unit-4)
1118 ("rust-chrono" ,rust-chrono-0.4)
1119 ("rust-derive-new" ,rust-derive-new-0.5)
1120 ("rust-getset" ,rust-getset-0.1)
1121 ("rust-indexmap" ,rust-indexmap-1)
1122 ("rust-log" ,rust-log-0.4)
1123 ("rust-nu-errors" ,rust-nu-errors-0.26)
1124 ("rust-nu-source" ,rust-nu-source-0.26)
1125 ("rust-num-bigint" ,rust-num-bigint-0.3)
1126 ("rust-num-integer" ,rust-num-integer-0.1)
1127 ("rust-num-traits" ,rust-num-traits-0.2)
1128 ("rust-serde" ,rust-serde-1)
1129 ("rust-serde-bytes" ,rust-serde-bytes-0.11)
1130 ("rust-serde-json" ,rust-serde-json-1)
1131 ("rust-serde-yaml" ,rust-serde-yaml-0.8)
1132 ("rust-toml" ,rust-toml-0.5))))
1133 (home-page "https://www.nushell.sh")
1134 (synopsis "Core values and protocols for Nushell")
1135 (description "Core values and protocols for Nushell")
1138 (define-public rust-nu-source-0.26
1140 (name "rust-nu-source")
1145 (uri (crate-uri "nu-source" version))
1146 (file-name (string-append name "-" version ".tar.gz"))
1148 (base32 "1sdmasal3qqcp8fjpqncppc81m0984bp528lb9zggipbxzjpvb3i"))))
1149 (build-system cargo-build-system)
1153 (("rust-derive-new" ,rust-derive-new-0.5)
1154 ("rust-getset" ,rust-getset-0.1)
1155 ("rust-pretty" ,rust-pretty-0.5)
1156 ("rust-serde" ,rust-serde-1)
1157 ("rust-termcolor" ,rust-termcolor-1))))
1158 (home-page "https://www.nushell.sh")
1159 (synopsis "Source string characterizer for Nushell")
1161 "This package provides a source string characterizer for
1165 (define-public rust-nu-stream-0.26
1167 (name "rust-nu-stream")
1172 (uri (crate-uri "nu-stream" version))
1173 (file-name (string-append name "-" version ".tar.gz"))
1175 (base32 "1y7f28zxfrlhi9qrpbk6dpzb3wr6f59yhx3yim001796c1x6xlcs"))))
1176 (build-system cargo-build-system)
1180 (("rust-futures" ,rust-futures-0.3)
1181 ("rust-nu-errors" ,rust-nu-errors-0.26)
1182 ("rust-nu-protocol" ,rust-nu-protocol-0.26)
1183 ("rust-nu-source" ,rust-nu-source-0.26))))
1184 (home-page "https://www.nushell.sh")
1185 (synopsis "Nushell stream")
1186 (description "This package provides Nushell stream.")
1189 (define-public rust-nu-table-0.26
1191 (name "rust-nu-table")
1196 (uri (crate-uri "nu-table" version))
1197 (file-name (string-append name "-" version ".tar.gz"))
1199 (base32 "1kxgmngfzi13xr2r65f5mxy24a8d1d0xrhi9bfjp5955r8r09km4"))))
1200 (build-system cargo-build-system)
1204 (("rust-ansi-term" ,rust-ansi-term-0.12)
1205 ("rust-regex" ,rust-regex-1)
1206 ("rust-unicode-width" ,rust-unicode-width-0.1))))
1207 (home-page "https://www.nushell.sh")
1208 (synopsis "Nushell table printing")
1209 (description "Nushell table printing")
1212 (define-public rust-nu-test-support-0.26
1214 (name "rust-nu-test-support")
1219 (uri (crate-uri "nu-test-support" version))
1220 (file-name (string-append name "-" version ".tar.gz"))
1222 (base32 "0nlr9sqjiwviw15x76cc87n6366fxkxz1lsfh6m2ncca1zwgpa69"))))
1223 (build-system cargo-build-system)
1227 (("rust-bigdecimal" ,rust-bigdecimal-0.2)
1228 ("rust-chrono" ,rust-chrono-0.4)
1229 ("rust-dunce" ,rust-dunce-1)
1230 ("rust-getset" ,rust-getset-0.1)
1231 ("rust-glob" ,rust-glob-0.3)
1232 ("rust-indexmap" ,rust-indexmap-1)
1233 ("rust-nu-errors" ,rust-nu-errors-0.26)
1234 ("rust-nu-protocol" ,rust-nu-protocol-0.26)
1235 ("rust-nu-source" ,rust-nu-source-0.26)
1236 ("rust-nu-value-ext" ,rust-nu-value-ext-0.26)
1237 ("rust-num-bigint" ,rust-num-bigint-0.3)
1238 ("rust-tempfile" ,rust-tempfile-3))))
1239 (home-page "https://www.nushell.sh")
1240 (synopsis "Support for writing Nushell tests")
1241 (description "This package provides support for writing Nushell
1245 (define-public rust-nu-value-ext-0.26
1247 (name "rust-nu-value-ext")
1252 (uri (crate-uri "nu-value-ext" version))
1254 (string-append name "-" version ".tar.gz"))
1256 (base32 "12qwxhkxdxsg7q6kbsqg46127lsy150b53kpbly0s8cgwra3bhv5"))))
1257 (build-system cargo-build-system)
1261 (("rust-indexmap" ,rust-indexmap-1)
1262 ("rust-itertools" ,rust-itertools-0.10)
1263 ("rust-nu-errors" ,rust-nu-errors-0.26)
1264 ("rust-nu-protocol" ,rust-nu-protocol-0.26)
1265 ("rust-nu-source" ,rust-nu-source-0.26)
1266 ("rust-num-traits" ,rust-num-traits-0.2))))
1267 (home-page "https://www.nushell.sh")
1268 (synopsis "@code{Extension} traits for values in Nushell")
1270 "This package provides @code{Extension} traits for values in