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, 2017, 2018, 2019, 2020 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 ng0 <ng0@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>
18 ;;; This file is part of GNU Guix.
20 ;;; GNU Guix is free software; you can redistribute it and/or modify it
21 ;;; under the terms of the GNU General Public License as published by
22 ;;; the Free Software Foundation; either version 3 of the License, or (at
23 ;;; your option) any later version.
25 ;;; GNU Guix is distributed in the hope that it will be useful, but
26 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
27 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28 ;;; GNU General Public License for more details.
30 ;;; You should have received a copy of the GNU General Public License
31 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
33 (define-module (gnu packages shells)
34 #:use-module (gnu packages)
35 #:use-module (gnu packages autotools)
36 #:use-module (gnu packages base)
37 #:use-module (gnu packages bash)
38 #:use-module (gnu packages bison)
39 #:use-module (gnu packages documentation)
40 #:use-module (gnu packages groff)
41 #:use-module (gnu packages guile)
42 #:use-module (gnu packages libbsd)
43 #:use-module (gnu packages libedit)
44 #:use-module (gnu packages ncurses)
45 #:use-module (gnu packages pcre)
46 #:use-module (gnu packages perl)
47 #:use-module (gnu packages pkg-config)
48 #:use-module (gnu packages python)
49 #:use-module (gnu packages python-xyz)
50 #:use-module (gnu packages readline)
51 #:use-module (gnu packages scheme)
52 #:use-module (guix build-system gnu)
53 #:use-module (guix build-system python)
54 #:use-module (guix build-system trivial)
55 #:use-module (guix download)
56 #:use-module (guix git-download)
57 #:use-module (guix licenses)
58 #:use-module (guix packages))
67 (uri (string-append "http://gondor.apana.org.au/~herbert/dash/files/"
68 "dash-" version ".tar.gz"))
71 "0wb0bwmqc661hylqcfdp7l7x12myw3vpqk513ncyqrjwvhckjriw"))
72 (modules '((guix build utils)))
75 ;; The man page hails from BSD, where (d)ash is the default shell.
76 ;; This isn't the case on Guix or indeed most other GNU systems.
77 (substitute* "src/dash.1"
78 (("the standard command interpreter for the system")
79 "a command interpreter based on the original Bourne shell"))
81 (build-system gnu-build-system)
83 `(("libedit" ,libedit)))
85 '(#:configure-flags '("--with-libedit")))
86 (home-page "http://gondor.apana.org.au/~herbert/dash")
87 (synopsis "POSIX-compliant shell optimised for size")
89 "dash is a POSIX-compliant @command{/bin/sh} implementation that aims to be
90 as small as possible, often without sacrificing speed. It is faster than the
91 GNU Bourne-Again Shell (@command{bash}) at most scripted tasks. dash is a
92 direct descendant of NetBSD's Almquist Shell (@command{ash}).")
94 gpl2+)))) ; mksignames.c
103 (uri (string-append "https://github.com/fish-shell/fish-shell/"
104 "releases/download/" version "/"
105 "fish-" version ".tar.gz"))
107 (base32 "03j3jl9jzlnhq4p86zj8wqsh5sx45j1d1fvfa80ks1cfdg68qwhl"))))
108 (build-system gnu-build-system)
110 `(("fish-foreign-env" ,fish-foreign-env)
111 ("groff" ,groff) ; for 'fish --help'
113 ("pcre2" ,pcre2) ; don't use the bundled PCRE2
114 ("python" ,python))) ; for fish_config and manpage completions
116 `(("doxygen" ,doxygen)))
118 '(#:tests? #f ; no check target
120 (modify-phases %standard-phases
121 (add-after 'unpack 'patch-source
123 (substitute* '("build_tools/build_commands_hdr.sh"
124 "build_tools/build_user_doc.sh")
125 (("/usr/bin/env") "env"))
127 ;; Embed absolute paths.
128 (add-before 'install 'embed-absolute-paths
130 (substitute* '("share/functions/__fish_config_interactive.fish"
131 "share/functions/fish_config.fish"
132 "share/functions/fish_update_completions.fish")
133 (("python3") (which "python3")))
134 (substitute* "share/functions/__fish_print_help.fish"
135 (("nroff") (which "nroff")))
137 ;; Source /etc/fish/config.fish from $__fish_sysconf_dir/config.fish.
138 (add-before 'install 'patch-fish-config
140 (let ((port (open-file "etc/config.fish" "a")))
141 (display (string-append
143 "# Patched by Guix.\n"
144 "# Source /etc/fish/config.fish.\n"
145 "if test -f /etc/fish/config.fish\n"
146 " source /etc/fish/config.fish\n"
151 ;; Enable completions, functions and configurations in user's and
152 ;; system's guix profiles by adding them to __extra_* variables.
153 (add-before 'install 'patch-fish-extra-paths
155 (let ((port (open-file "share/__fish_build_paths.fish" "a")))
159 "# Patched by Guix.\n"
160 "# Enable completions, functions and configurations in user's"
161 " and system's guix profiles by adding them to __extra_*"
163 "set -l __guix_profile_paths ~/.guix-profile"
164 " /run/current-system/profile\n"
165 "set __extra_completionsdir"
166 " $__guix_profile_paths\"/etc/fish/completions\""
167 " $__guix_profile_paths\"/share/fish/vendor_completions.d\""
168 " $__extra_completionsdir\n"
169 "set __extra_functionsdir"
170 " $__guix_profile_paths\"/etc/fish/functions\""
171 " $__guix_profile_paths\"/share/fish/vendor_functions.d\""
172 " $__extra_functionsdir\n"
173 "set __extra_confdir"
174 " $__guix_profile_paths\"/etc/fish/conf.d\""
175 " $__guix_profile_paths\"/share/fish/vendor_conf.d\""
176 " $__extra_confdir\n")
180 ;; Use fish-foreign-env to source /etc/profile.
181 (add-before 'install 'source-etc-profile
182 (lambda* (#:key inputs #:allow-other-keys)
183 (let ((port (open-file "share/__fish_build_paths.fish" "a")))
187 "# Patched by Guix.\n"
188 "# Use fish-foreign-env to source /etc/profile.\n"
189 "if status is-login\n"
190 " set fish_function_path "
191 (assoc-ref inputs "fish-foreign-env") "/share/fish/functions"
192 " $__fish_datadir/functions\n"
193 " fenv source /etc/profile\n"
194 " set -e fish_function_path\n"
199 (synopsis "The friendly interactive shell")
201 "Fish (friendly interactive shell) is a shell focused on interactive use,
202 discoverability, and friendliness. Fish has very user-friendly and powerful
203 tab-completion, including descriptions of every completion, completion of
204 strings with wildcards, and many completions for specific commands. It also
205 has extensive and discoverable help. A special @command{help} command gives
206 access to all the fish documentation in your web browser. Other features
207 include smart terminal handling based on terminfo, an easy to search history,
208 and syntax highlighting.")
209 (home-page "https://fishshell.com/")
212 (define-public fish-foreign-env
214 (name "fish-foreign-env")
215 (version "0.20190116")
220 (url "https://github.com/oh-my-fish/plugin-foreign-env.git")
221 (commit "dddd9213272a0ab848d474d0cbde12ad034e65bc")))
222 (file-name (git-file-name name version))
224 (base32 "00xqlyl3lffc5l0viin1nyp819wf81fncqyz87jx8ljjdhilmgbs"))))
225 (build-system trivial-build-system)
227 '(#:modules ((guix build utils))
230 (use-modules (guix build utils))
231 (let* ((source (assoc-ref %build-inputs "source"))
232 (out (assoc-ref %outputs "out"))
233 (func-path (string-append out "/share/fish/functions")))
235 (copy-recursively (string-append source "/functions")
238 ;; Embed absolute paths.
239 (substitute* `(,(string-append func-path "/fenv.fish")
240 ,(string-append func-path "/fenv.apply.fish")
241 ,(string-append func-path "/fenv.main.fish"))
243 (string-append (assoc-ref %build-inputs "bash") "/bin/bash"))
245 (string-append (assoc-ref %build-inputs "sed") "/bin/sed"))
247 (string-append " " (assoc-ref %build-inputs "coreutils")
251 ("coreutils" ,coreutils)
253 (home-page "https://github.com/oh-my-fish/plugin-foreign-env")
254 (synopsis "Foreign environment interface for fish shell")
255 (description "@code{fish-foreign-env} wraps bash script execution in a way
256 that environment variables that are exported or modified get imported back
267 (url "https://github.com/rakitzis/rc.git")
268 (commit (string-append "v" version))))
271 "0vj1h4pcg13vxsiydmmk87dr2sra9h4gwx0c4q6fjsiw4in78rrd"))
272 (file-name (git-file-name name version))))
273 (build-system gnu-build-system)
278 (modify-phases %standard-phases
279 (add-before 'bootstrap 'patch-trip.rc
281 (substitute* "trip.rc"
282 (("/bin/pwd") (which "pwd"))
283 (("/bin/sh") (which "sh"))
284 (("/bin/rm") (which "rm"))
285 (("/bin\\)") (string-append (dirname (which "rm")) ")")))
287 (inputs `(("readline" ,readline)
289 (native-inputs `(("autoconf" ,autoconf)
290 ("automake" ,automake)
292 ("pkg-config" ,pkg-config)))
293 (synopsis "Alternative implementation of the rc shell by Byron Rakitzis")
295 "This is a reimplementation by Byron Rakitzis of the Plan 9 shell. It
296 has a small feature set similar to a traditional Bourne shell.")
297 (home-page "https://github.com/rakitzis/rc")
307 (uri (string-append "https://github.com/wryun/es-shell/releases/"
308 "download/v" version "/es-" version ".tar.gz"))
311 "1fplzxc6lncz2lv2fyr2ig23rgg5j96rm2bbl1rs28mik771zd5h"))
312 (file-name (string-append name "-" version ".tar.gz"))))
313 (build-system gnu-build-system)
315 `(#:test-target "test"
317 (modify-phases %standard-phases
318 (add-before 'configure 're-enter-rootdir
319 ;; The tarball has no folder.
323 `(("readline" ,readline)))
326 (synopsis "Extensible shell with higher-order functions")
328 "Es is an extensible shell. The language was derived from the Plan 9
329 shell, rc, and was influenced by functional programming languages, such as
330 Scheme, and the Tcl embeddable programming language. This implementation is
331 derived from Byron Rakitzis's public domain implementation of rc, and was
332 written by Paul Haahr and Byron Rakitzis.")
333 (home-page "https://wryun.github.io/es-shell/")
334 (license public-domain)))
342 ;; Old tarballs are moved to old/.
343 (uri (list (string-append "ftp://ftp.astron.com/pub/tcsh/"
344 "tcsh-" version ".tar.gz")
345 (string-append "ftp://ftp.astron.com/pub/tcsh/"
346 "old/tcsh-" version ".tar.gz")))
349 "0nw8prz1n0lmr82wnpyhrzmki630afn7p9cfgr3vl00vr9c72a7d"))
350 (patches (search-patches "tcsh-fix-autotest.patch"))
351 (patch-flags '("-p0"))))
352 (build-system gnu-build-system)
354 `(("autoconf" ,autoconf)
357 `(("ncurses" ,ncurses)))
360 (modify-phases %standard-phases
361 ,@(if (%current-target-system)
362 '((add-before 'configure 'set-cross-cc
364 (substitute* "configure"
365 (("CC_FOR_GETHOST=\"cc\"")
366 "CC_FOR_GETHOST=\"gcc\""))
369 (add-before 'check 'patch-test-scripts
372 (substitute* '("tests/commands.at" "tests/variables.at")
373 (("/bin/pwd") (which "pwd")))
374 ;; The .at files create shell scripts without shebangs. Erk.
375 (substitute* "tests/commands.at"
376 (("./output.sh") "/bin/sh output.sh"))
377 (substitute* "tests/syntax.at"
378 (("; other_script.csh") "; /bin/sh other_script.csh"))
379 ;; Now, let's generate the test suite and patch it
380 (invoke "make" "tests/testsuite")
382 ;; This file is ISO-8859-1 encoded.
383 (with-fluids ((%default-port-encoding #f))
384 (substitute* "tests/testsuite"
385 (("/bin/sh") (which "sh"))))
387 (add-after 'install 'post-install
388 (lambda* (#:key inputs outputs #:allow-other-keys)
389 (let* ((out (assoc-ref %outputs "out"))
390 (bin (string-append out "/bin")))
391 (with-directory-excursion bin
392 (symlink "tcsh" "csh"))
394 (home-page "https://www.tcsh.org/")
395 (synopsis "Unix shell based on csh")
397 "Tcsh is an enhanced, but completely compatible version of the Berkeley
398 UNIX C shell (csh). It is a command language interpreter usable both as an
399 interactive login shell and a shell script command processor. It includes a
400 command-line editor, programmable word completion, spelling correction, a
401 history mechanism, job control and a C-like syntax.")
410 (uri (list (string-append
411 "https://www.zsh.org/pub/zsh-" version
414 "https://www.zsh.org/pub/old/zsh-" version
418 "09yyaadq738zlrnlh1hd3ycj1mv3q5hh4xl1ank70mjnqm6bbi6w"))))
419 (build-system gnu-build-system)
420 (arguments `(#:configure-flags '("--with-tcsetpgrp" "--enable-pcre"
421 "--enable-maildir-support")
423 (modify-phases %standard-phases
424 (add-before 'configure 'fix-sh
426 ;; Some of the files are ISO-8859-1 encoded.
427 (with-fluids ((%default-port-encoding #f))
433 "Config/installfns.sh"
435 "Test/E01options.ztst"
436 "Test/A05execution.ztst"
437 "Test/A01grammar.ztst"
438 "Test/A06assign.ztst"
439 "Test/B02typeset.ztst"
440 "Completion/Unix/Command/_init_d"
442 (("/bin/sh") (which "sh"))))))
443 (add-before 'check 'patch-test
445 ;; In Zsh, `command -p` searches a predefined set of
446 ;; paths that don't exist in the build environment. See
447 ;; the assignment of 'path' in Src/init.c'
448 (substitute* "Test/A01grammar.ztst"
449 (("command -pv") "command -v")
450 (("command -p") "command ")
451 (("'command' -p") "'command' "))
453 (native-inputs `(("autoconf" ,autoconf)))
454 (inputs `(("ncurses" ,ncurses)
457 (synopsis "Powerful shell for interactive use and scripting")
458 (description "The Z shell (zsh) is a Unix shell that can be used
459 as an interactive login shell and as a powerful command interpreter
460 for shell scripting. Zsh can be thought of as an extended Bourne shell
461 with a large number of improvements, including some features of bash,
463 (home-page "https://www.zsh.org/")
465 ;; The whole thing is under an MIT/X11-style license, but there's one
466 ;; command, 'Completion/Unix/Command/_darcs', which is under GPLv2+.
476 (uri (pypi-uri "xonsh" version))
479 "0c2bbmdg0n10q54vq9k1z5n53l0mh1hb1q5xprfhilvrbr6hlcwr"))
480 (modules '((guix build utils)))
483 ;; Delete bundled ply.
484 (delete-file-recursively "xonsh/ply")
485 (substitute* '("setup.py")
486 (("'xonsh\\.ply\\.ply',") ""))
488 (build-system python-build-system)
490 '(;; TODO Try running run the test suite.
491 ;; See 'requirements-tests.txt' in the source distribution for more
495 `(("python-ply" ,python-ply)))
496 (home-page "https://xon.sh/")
497 (synopsis "Python-ish shell")
499 "Xonsh is a Python-ish, BASHwards-looking shell language and command
500 prompt. The language is a superset of Python 3.4+ with additional shell
501 primitives that you are used to from Bash and IPython. It works on all major
502 systems including Linux, Mac OSX, and Windows. Xonsh is meant for the daily
503 use of experts and novices alike.")
507 (let ((commit "114432435e4eadd54334df6b37fcae505079b49f")
511 (version (string-append "0.0.0-" revision "." (string-take commit 7)))
516 (url "https://github.com/scheme/scsh")
518 (file-name (string-append name "-" version "-checkout"))
521 "1ghk08akiz7hff1pndi8rmgamgcrn2mv9asbss9l79d3c2iaav3q"))))
522 (build-system gnu-build-system)
524 `(#:test-target "test"
526 (modify-phases %standard-phases
527 (add-before 'configure 'replace-rx
528 (lambda* (#:key inputs #:allow-other-keys)
529 (let* ((rx (assoc-ref inputs "scheme48-rx"))
530 (rxpath (string-append rx "/share/scheme48-"
531 ,(package-version scheme48)
533 (delete-file-recursively "rx")
534 (symlink rxpath "rx"))
537 `(("scheme48" ,scheme48)
538 ("scheme48-rx" ,scheme48-rx)))
540 `(("autoconf" ,autoconf)
541 ("automake" ,automake)))
542 (home-page "https://github.com/scheme/scsh")
543 (synopsis "Unix shell embedded in Scheme")
545 "Scsh is a Unix shell embedded in Scheme. Scsh has two main
546 components: a process notation for running programs and setting up pipelines
547 and redirections, and a complete syscall library for low-level access to the
551 (define-public linenoise
552 (let ((commit "2105ce445821381cf1bca87b6d386d4ea88ee20d")
556 (version (string-append "1.0-" revision "." (string-take commit 7)))
561 (url "https://github.com/antirez/linenoise")
563 (file-name (string-append name "-" version "-checkout"))
566 "1z16qwix8z6a40fskdgxsibkqgdrp4q6ncp4n6hnv4r9iihy2d8r"))))
567 (build-system gnu-build-system)
569 `(#:tests? #f ;No tests are included
570 #:make-flags (list "CC=gcc")
572 (modify-phases %standard-phases
575 (lambda* (#:key outputs #:allow-other-keys)
576 ;; At the moment there is no 'make install' in upstream.
577 (let* ((out (assoc-ref outputs "out")))
578 (install-file "linenoise.h"
579 (string-append out "/include/linenoise"))
580 (install-file "linenoise.c"
581 (string-append out "/include/linenoise"))
583 (home-page "https://github.com/antirez/linenoise")
584 (synopsis "Minimal zero-config readline replacement")
586 "Linenoise is a minimal, zero-config, readline replacement.
587 Its features include:
590 @item Single and multi line editing mode with the usual key bindings
591 @item History handling
593 @item Hints (suggestions at the right of the prompt as you type)
594 @item A subset of VT100 escapes, ANSI.SYS compatible
598 (define-public s-shell
599 (let ((commit "da2e5c20c0c5f477ec3426dc2584889a789b1659")
603 (version (git-version "0.0.0" revision commit))
608 (url "https://github.com/rain-1/s")
610 (file-name (string-append name "-" version "-checkout"))
613 "0qiny71ww5nhzy4mnc8652hn0mlxyb67h333gbdxp4j4qxsi13q4"))))
614 (build-system gnu-build-system)
616 `(("linenoise" ,linenoise)))
619 #:make-flags (list "CC=gcc"
620 (string-append "PREFIX="
621 (assoc-ref %outputs "out")))
623 (modify-phases %standard-phases
624 (add-after 'unpack 'install-directory-fix
625 (lambda* (#:key outputs #:allow-other-keys)
626 (let* ((out (assoc-ref outputs "out"))
627 (bin (string-append out "/bin")))
628 (substitute* "Makefile"
631 (add-after 'install 'manpage
632 (lambda* (#:key outputs #:allow-other-keys)
633 (install-file "s.1" (string-append (assoc-ref outputs "out")
634 "/share/man/man1"))))
636 (lambda* (#:key inputs outputs #:allow-other-keys)
637 ;; At this point linenoise is meant to be included,
638 ;; so we have to really copy it into the working directory
640 (let* ((linenoise (assoc-ref inputs "linenoise"))
641 (noisepath (string-append linenoise "/include/linenoise"))
642 (out (assoc-ref outputs "out")))
643 (copy-recursively noisepath "linenoise")
645 (("/bin/s") (string-append out "/bin/s")))
647 (home-page "https://github.com/rain-1/s")
648 (synopsis "Extremely minimal shell with the simplest syntax possible")
650 "S is a new shell that aims to be extremely simple.
651 S does not implemnt the POSIX shell standard.
652 There are no globs or \"splatting\" where a variable $FOO turns into multiple
653 command line arguments. One token stays one token forever.
654 This is a \"no surprises\" straightforward approach.
656 There are no redirection operators > in the shell language, they are added as
657 extra programs. > is just another unix command, < is essentially cat(1).
658 A @code{andglob} program is also provided along with s.")
668 (uri (string-append "https://connochaetos.org/oksh/oksh-"
672 "0ln9yf6pxngsviqszv8klnnvn8vcpplvj1njdn8xr2y8frkbw8r3"))))
673 (build-system gnu-build-system)
675 `(; The test files are not part of the distributed tarball.
677 (home-page "https://connochaetos.org/oksh")
678 (synopsis "Port of OpenBSD Korn Shell")
680 "Oksh is a port of the OpenBSD Korn Shell.
681 The OpenBSD Korn Shell is a cleaned up and enhanced ksh.")
692 (url "https://github.com/dimkr/loksh.git")
694 (file-name (git-file-name name version))
696 (base32 "1a8s64n97ikvvi7ckirxnnjvcmhr3dd4rnqm2ivapyzb0wp42jk7"))))
697 (build-system gnu-build-system)
700 ("ncurses" ,ncurses)))
702 `(("pkg-config" ,pkg-config)))
704 `(#:tests? #f ; no tests included
705 #:make-flags (list "CC=gcc" "HAVE_LIBBSD=1"
706 (string-append "PREFIX="
707 (assoc-ref %outputs "out")))
709 (modify-phases %standard-phases
710 (delete 'configure)))) ; no configure script
711 (home-page "https://github.com/dimkr/loksh")
712 (synopsis "Korn Shell from OpenBSD")
714 "loksh is a Linux port of OpenBSD's @command{ksh}. It is a small,
715 interactive POSIX shell targeted at resource-constrained systems.")
716 ;; The file 'LEGAL' says it is the public domain, and the 2
717 ;; exceptions which are listed are not included in this port.
718 (license public-domain)))
727 (uri (string-append "https://www.mirbsd.org/MirOS/dist/mir/mksh/mksh-R"
730 (base32 "0xdykm1z710wriwd6nc8s8lwk2dwjl63dq96xxaawlid31a1241x"))))
731 (build-system gnu-build-system)
733 `(#:tests? #f ; tests require access to /dev/tty
735 (modify-phases %standard-phases
740 (invoke (which "sh") "Build.sh")))
742 (lambda* (#:key outputs #:allow-other-keys)
743 (let* ((out (assoc-ref outputs "out"))
744 (bin (string-append out "/bin"))
745 (man (string-append out "/share/man/man1")))
746 (install-file "mksh" bin)
747 (with-directory-excursion bin
748 (symlink "mksh" "ksh"))
749 (install-file "mksh.1" man)
751 (home-page "https://www.mirbsd.org/mksh.htm")
752 (synopsis "Korn Shell from MirBSD")
753 (description "mksh is an actively developed free implementation of the
754 Korn Shell programming language and a successor to the Public Domain Korn
759 (define-public oil-shell
765 (uri (string-append "https://www.oilshell.org/download/oil-"
769 "12c9s462879adb6mwd3fqafk0dnqsm16s18rhym6cmzfzy8v8zm3"))))
770 (build-system gnu-build-system)
772 '(#:tests? #f ; the tests are not distributed in the tarballs
773 #:strip-binaries? #f ; the binaries cannot be stripped
775 (modify-phases %standard-phases
776 (add-after 'unpack 'patch-compiler-invocation
778 (substitute* "configure"
782 (lambda* (#:key outputs #:allow-other-keys)
783 (let ((out (assoc-ref outputs "out")))
785 ;; The configure script doesn't recognize CONFIG_SHELL.
786 (setenv "CONFIG_SHELL" (which "sh"))
787 (invoke "./configure" (string-append "--prefix=" out)
788 "--with-readline"))))
789 (add-before 'install 'make-destination
791 ;; The build scripts don't create the destination directory.
792 (mkdir-p (string-append (assoc-ref %outputs "out") "/bin")))))))
794 `(("readline" ,readline)))
795 (synopsis "Bash-compatible Unix shell")
796 (description "Oil is a Unix / POSIX shell, compatible with Bash. It
797 implements the Oil language, which is a new shell language to which Bash can be
798 automatically translated. The Oil language is a superset of Bash. It also
799 implements the OSH language, a statically-parseable language based on Bash as it
800 is commonly written.")
801 (home-page "https://www.oilshell.org/")
802 (license (list psfl ; The Oil sources include a patched Python 2 source tree
810 (origin (method url-fetch)
811 (uri (string-append "mirror://savannah/gash/gash-"
815 "13m0yz5h9nj3x40mr6wr5xcpq1lscndfwcicw3skrz801025hhgf"))
816 (modules '((guix build utils)))))
817 (build-system gnu-build-system)
819 `(("pkg-config" ,pkg-config)))
821 `(("guile" ,guile-2.2)))
823 '(#:make-flags '("XFAIL_TESTS=tests/redirects.org")))
824 (home-page "https://savannah.nongnu.org/projects/gash/")
825 (synopsis "POSIX-compatible shell written in Guile Scheme")
826 (description "Gash is a POSIX-compatible shell written in Guile
827 Scheme. It provides both the shell interface, as well as a Guile
828 library for parsing shell scripts. Gash is designed to bootstrap Bash
829 as part of the Guix bootstrap process.")
832 (define-public gash-utils
838 (uri (string-append "mirror://savannah/gash/gash-utils-"
842 "0ib2p52qmbac5n0s5bys4fiwim461ps546976l1n7pwbs0avh7fk"))))
843 (build-system gnu-build-system)
845 `(("pkg-config" ,pkg-config)))
847 `(("guile" ,guile-2.2)
849 (home-page "https://savannah.nongnu.org/projects/gash/")
850 (synopsis "Core POSIX utilities written in Guile Scheme")
851 (description "Gash-Utils provides Scheme implementations of many
852 common POSIX utilities (there are about 40 of them, ranging in
853 complexity from @command{false} to @command{awk}). The utilities are
854 designed to be capable of bootstrapping their standard GNU counterparts.
855 Underpinning these utilities are many Scheme interfaces for manipulating