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 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 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
15 ;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
17 ;;; This file is part of GNU Guix.
19 ;;; GNU Guix is free software; you can redistribute it and/or modify it
20 ;;; under the terms of the GNU General Public License as published by
21 ;;; the Free Software Foundation; either version 3 of the License, or (at
22 ;;; your option) any later version.
24 ;;; GNU Guix is distributed in the hope that it will be useful, but
25 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
26 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27 ;;; GNU General Public License for more details.
29 ;;; You should have received a copy of the GNU General Public License
30 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
32 (define-module (gnu packages shells)
33 #:use-module (gnu packages)
34 #:use-module (gnu packages autotools)
35 #:use-module (gnu packages base)
36 #:use-module (gnu packages bash)
37 #:use-module (gnu packages bison)
38 #:use-module (gnu packages documentation)
39 #:use-module (gnu packages groff)
40 #:use-module (gnu packages guile)
41 #:use-module (gnu packages libbsd)
42 #:use-module (gnu packages libedit)
43 #:use-module (gnu packages ncurses)
44 #:use-module (gnu packages pcre)
45 #:use-module (gnu packages perl)
46 #:use-module (gnu packages pkg-config)
47 #:use-module (gnu packages python)
48 #:use-module (gnu packages python-xyz)
49 #:use-module (gnu packages readline)
50 #:use-module (gnu packages scheme)
51 #:use-module (guix build-system gnu)
52 #:use-module (guix build-system python)
53 #:use-module (guix build-system trivial)
54 #:use-module (guix download)
55 #:use-module (guix git-download)
56 #:use-module (guix licenses)
57 #:use-module (guix packages))
66 (uri (string-append "http://gondor.apana.org.au/~herbert/dash/files/"
67 "dash-" version ".tar.gz"))
70 "0wb0bwmqc661hylqcfdp7l7x12myw3vpqk513ncyqrjwvhckjriw"))
71 (modules '((guix build utils)))
74 ;; The man page hails from BSD, where (d)ash is the default shell.
75 ;; This isn't the case on Guix or indeed most other GNU systems.
76 (substitute* "src/dash.1"
77 (("the standard command interpreter for the system")
78 "a command interpreter based on the original Bourne shell"))
80 (build-system gnu-build-system)
82 `(("libedit" ,libedit)))
84 '(#:configure-flags '("--with-libedit")))
85 (home-page "http://gondor.apana.org.au/~herbert/dash")
86 (synopsis "POSIX-compliant shell optimised for size")
88 "dash is a POSIX-compliant @command{/bin/sh} implementation that aims to be
89 as small as possible, often without sacrificing speed. It is faster than the
90 GNU Bourne-Again Shell (@command{bash}) at most scripted tasks. dash is a
91 direct descendant of NetBSD's Almquist Shell (@command{ash}).")
93 gpl2+)))) ; mksignames.c
102 (uri (string-append "https://github.com/fish-shell/fish-shell/"
103 "releases/download/" version "/"
104 name "-" version ".tar.gz"))
106 (base32 "03j3jl9jzlnhq4p86zj8wqsh5sx45j1d1fvfa80ks1cfdg68qwhl"))))
107 (build-system gnu-build-system)
109 `(("fish-foreign-env" ,fish-foreign-env)
110 ("groff" ,groff) ; for 'fish --help'
112 ("pcre2" ,pcre2) ; don't use the bundled PCRE2
113 ("python" ,python))) ; for fish_config and manpage completions
115 `(("doxygen" ,doxygen)))
117 '(#:tests? #f ; no check target
119 (modify-phases %standard-phases
120 (add-after 'unpack 'patch-source
122 (substitute* '("build_tools/build_commands_hdr.sh"
123 "build_tools/build_user_doc.sh")
124 (("/usr/bin/env") "env"))
126 ;; Embed absolute paths.
127 (add-before 'install 'embed-absolute-paths
129 (substitute* '("share/functions/__fish_config_interactive.fish"
130 "share/functions/fish_config.fish"
131 "share/functions/fish_update_completions.fish")
132 (("python3") (which "python3")))
133 (substitute* "share/functions/__fish_print_help.fish"
134 (("nroff") (which "nroff")))
136 ;; Source /etc/fish/config.fish from $__fish_sysconf_dir/config.fish.
137 (add-before 'install 'patch-fish-config
139 (let ((port (open-file "etc/config.fish" "a")))
140 (display (string-append
142 "# Patched by Guix.\n"
143 "# Source /etc/fish/config.fish.\n"
144 "if test -f /etc/fish/config.fish\n"
145 " source /etc/fish/config.fish\n"
150 ;; Enable completions, functions and configurations in user's and
151 ;; system's guix profiles by adding them to __extra_* variables.
152 (add-before 'install 'patch-fish-extra-paths
154 (let ((port (open-file "share/__fish_build_paths.fish" "a")))
158 "# Patched by Guix.\n"
159 "# Enable completions, functions and configurations in user's"
160 " and system's guix profiles by adding them to __extra_*"
162 "set -l __guix_profile_paths ~/.guix-profile"
163 " /run/current-system/profile\n"
164 "set __extra_completionsdir"
165 " $__guix_profile_paths\"/etc/fish/completions\""
166 " $__guix_profile_paths\"/share/fish/vendor_completions.d\""
167 " $__extra_completionsdir\n"
168 "set __extra_functionsdir"
169 " $__guix_profile_paths\"/etc/fish/functions\""
170 " $__guix_profile_paths\"/share/fish/vendor_functions.d\""
171 " $__extra_functionsdir\n"
172 "set __extra_confdir"
173 " $__guix_profile_paths\"/etc/fish/conf.d\""
174 " $__guix_profile_paths\"/share/fish/vendor_conf.d\""
175 " $__extra_confdir\n")
179 ;; Use fish-foreign-env to source /etc/profile.
180 (add-before 'install 'source-etc-profile
181 (lambda* (#:key inputs #:allow-other-keys)
182 (let ((port (open-file "share/__fish_build_paths.fish" "a")))
186 "# Patched by Guix.\n"
187 "# Use fish-foreign-env to source /etc/profile.\n"
188 "if status is-login\n"
189 " set fish_function_path "
190 (assoc-ref inputs "fish-foreign-env") "/share/fish/functions"
191 " $__fish_datadir/functions\n"
192 " fenv source /etc/profile\n"
193 " set -e fish_function_path\n"
198 (synopsis "The friendly interactive shell")
200 "Fish (friendly interactive shell) is a shell focused on interactive use,
201 discoverability, and friendliness. Fish has very user-friendly and powerful
202 tab-completion, including descriptions of every completion, completion of
203 strings with wildcards, and many completions for specific commands. It also
204 has extensive and discoverable help. A special @command{help} command gives
205 access to all the fish documentation in your web browser. Other features
206 include smart terminal handling based on terminfo, an easy to search history,
207 and syntax highlighting.")
208 (home-page "https://fishshell.com/")
211 (define-public fish-foreign-env
213 (name "fish-foreign-env")
214 (version "0.20190116")
219 (url "https://github.com/oh-my-fish/plugin-foreign-env.git")
220 (commit "dddd9213272a0ab848d474d0cbde12ad034e65bc")))
221 (file-name (git-file-name name version))
223 (base32 "00xqlyl3lffc5l0viin1nyp819wf81fncqyz87jx8ljjdhilmgbs"))))
224 (build-system trivial-build-system)
226 '(#:modules ((guix build utils))
229 (use-modules (guix build utils))
230 (let* ((source (assoc-ref %build-inputs "source"))
231 (out (assoc-ref %outputs "out"))
232 (func-path (string-append out "/share/fish/functions")))
234 (copy-recursively (string-append source "/functions")
237 ;; Embed absolute paths.
238 (substitute* `(,(string-append func-path "/fenv.fish")
239 ,(string-append func-path "/fenv.apply.fish")
240 ,(string-append func-path "/fenv.main.fish"))
242 (string-append (assoc-ref %build-inputs "bash") "/bin/bash"))
244 (string-append (assoc-ref %build-inputs "sed") "/bin/sed"))
246 (string-append " " (assoc-ref %build-inputs "coreutils")
250 ("coreutils" ,coreutils)
252 (home-page "https://github.com/oh-my-fish/plugin-foreign-env")
253 (synopsis "Foreign environment interface for fish shell")
254 (description "@code{fish-foreign-env} wraps bash script execution in a way
255 that environment variables that are exported or modified get imported back
266 (url "https://github.com/rakitzis/rc.git")
267 (commit (string-append "v" version))))
270 "0vj1h4pcg13vxsiydmmk87dr2sra9h4gwx0c4q6fjsiw4in78rrd"))
271 (file-name (git-file-name name version))))
272 (build-system gnu-build-system)
277 (modify-phases %standard-phases
278 (add-before 'bootstrap 'patch-trip.rc
280 (substitute* "trip.rc"
281 (("/bin/pwd") (which "pwd"))
282 (("/bin/sh") (which "sh"))
283 (("/bin/rm") (which "rm"))
284 (("/bin\\)") (string-append (dirname (which "rm")) ")")))
286 (inputs `(("readline" ,readline)
288 (native-inputs `(("autoconf" ,autoconf)
289 ("automake" ,automake)
291 ("pkg-config" ,pkg-config)))
292 (synopsis "Alternative implementation of the rc shell by Byron Rakitzis")
294 "This is a reimplementation by Byron Rakitzis of the Plan 9 shell. It
295 has a small feature set similar to a traditional Bourne shell.")
296 (home-page "https://github.com/rakitzis/rc")
306 (uri (string-append "https://github.com/wryun/es-shell/releases/"
307 "download/v" version "/es-" version ".tar.gz"))
310 "1fplzxc6lncz2lv2fyr2ig23rgg5j96rm2bbl1rs28mik771zd5h"))
311 (file-name (string-append name "-" version ".tar.gz"))))
312 (build-system gnu-build-system)
314 `(#:test-target "test"
316 (modify-phases %standard-phases
317 (add-before 'configure 're-enter-rootdir
318 ;; The tarball has no folder.
322 `(("readline" ,readline)))
325 (synopsis "Extensible shell with higher-order functions")
327 "Es is an extensible shell. The language was derived from the Plan 9
328 shell, rc, and was influenced by functional programming languages, such as
329 Scheme, and the Tcl embeddable programming language. This implementation is
330 derived from Byron Rakitzis's public domain implementation of rc, and was
331 written by Paul Haahr and Byron Rakitzis.")
332 (home-page "https://wryun.github.io/es-shell/")
333 (license public-domain)))
341 ;; Old tarballs are moved to old/.
342 (uri (list (string-append "ftp://ftp.astron.com/pub/tcsh/"
343 "tcsh-" version ".tar.gz")
344 (string-append "ftp://ftp.astron.com/pub/tcsh/"
345 "old/tcsh-" version ".tar.gz")))
348 "17ggxkkn5skl0v1x0j6hbv5l0sgnidfzwv16992sqkdm983fg7dq"))
349 (patches (search-patches "tcsh-fix-autotest.patch"
350 "tcsh-fix-out-of-bounds-read.patch"))
351 (patch-flags '("-p0"))))
352 (build-system gnu-build-system)
354 `(("autoconf" ,autoconf)
357 `(("ncurses" ,ncurses)))
360 (modify-phases %standard-phases
361 (add-before 'check 'patch-test-scripts
364 (substitute* '("tests/commands.at" "tests/variables.at")
365 (("/bin/pwd") (which "pwd")))
366 ;; The .at files create shell scripts without shebangs. Erk.
367 (substitute* "tests/commands.at"
368 (("./output.sh") "/bin/sh output.sh"))
369 (substitute* "tests/syntax.at"
370 (("; other_script.csh") "; /bin/sh other_script.csh"))
371 ;; Now, let's generate the test suite and patch it
372 (invoke "make" "tests/testsuite")
374 ;; This file is ISO-8859-1 encoded.
375 (with-fluids ((%default-port-encoding #f))
376 (substitute* "tests/testsuite"
377 (("/bin/sh") (which "sh"))))
379 (add-after 'install 'post-install
380 (lambda* (#:key inputs outputs #:allow-other-keys)
381 (let* ((out (assoc-ref %outputs "out"))
382 (bin (string-append out "/bin")))
383 (with-directory-excursion bin
384 (symlink "tcsh" "csh"))
386 (home-page "http://www.tcsh.org/")
387 (synopsis "Unix shell based on csh")
389 "Tcsh is an enhanced, but completely compatible version of the Berkeley
390 UNIX C shell (csh). It is a command language interpreter usable both as an
391 interactive login shell and a shell script command processor. It includes a
392 command-line editor, programmable word completion, spelling correction, a
393 history mechanism, job control and a C-like syntax.")
402 (uri (list (string-append
403 "https://www.zsh.org/pub/zsh-" version
406 "https://www.zsh.org/pub/old/zsh-" version
410 "1s3yww0mzgvpc48kp0x868mm3gbna42sbgzya0nknj0x5hn2jq3j"))))
411 (build-system gnu-build-system)
412 (arguments `(#:configure-flags '("--with-tcsetpgrp" "--enable-pcre"
413 "--enable-maildir-support")
415 (modify-phases %standard-phases
416 (add-before 'configure 'fix-sh
418 ;; Some of the files are ISO-8859-1 encoded.
419 (with-fluids ((%default-port-encoding #f))
425 "Config/installfns.sh"
427 "Test/E01options.ztst"
428 "Test/A05execution.ztst"
429 "Test/A01grammar.ztst"
430 "Test/A06assign.ztst"
431 "Test/B02typeset.ztst"
432 "Completion/Unix/Command/_init_d"
434 (("/bin/sh") (which "sh"))))))
435 (add-before 'check 'patch-test
437 ;; In Zsh, `command -p` searches a predefined set of
438 ;; paths that don't exist in the build environment. See
439 ;; the assignment of 'path' in Src/init.c'
440 (substitute* "Test/A01grammar.ztst"
441 (("command -pv") "command -v")
442 (("command -p") "command ")
443 (("'command' -p") "'command' "))
445 (native-inputs `(("autoconf" ,autoconf)))
446 (inputs `(("ncurses" ,ncurses)
449 (synopsis "Powerful shell for interactive use and scripting")
450 (description "The Z shell (zsh) is a Unix shell that can be used
451 as an interactive login shell and as a powerful command interpreter
452 for shell scripting. Zsh can be thought of as an extended Bourne shell
453 with a large number of improvements, including some features of bash,
455 (home-page "https://www.zsh.org/")
457 ;; The whole thing is under an MIT/X11-style license, but there's one
458 ;; command, 'Completion/Unix/Command/_darcs', which is under GPLv2+.
468 (uri (pypi-uri "xonsh" version))
471 "0c2bbmdg0n10q54vq9k1z5n53l0mh1hb1q5xprfhilvrbr6hlcwr"))
472 (modules '((guix build utils)))
475 ;; Delete bundled ply.
476 (delete-file-recursively "xonsh/ply")
477 (substitute* '("setup.py")
478 (("'xonsh\\.ply\\.ply',") ""))
480 (build-system python-build-system)
482 '(;; TODO Try running run the test suite.
483 ;; See 'requirements-tests.txt' in the source distribution for more
487 `(("python-ply" ,python-ply)))
488 (home-page "https://xon.sh/")
489 (synopsis "Python-ish shell")
491 "Xonsh is a Python-ish, BASHwards-looking shell language and command
492 prompt. The language is a superset of Python 3.4+ with additional shell
493 primitives that you are used to from Bash and IPython. It works on all major
494 systems including Linux, Mac OSX, and Windows. Xonsh is meant for the daily
495 use of experts and novices alike.")
499 (let ((commit "114432435e4eadd54334df6b37fcae505079b49f")
503 (version (string-append "0.0.0-" revision "." (string-take commit 7)))
508 (url "https://github.com/scheme/scsh")
510 (file-name (string-append name "-" version "-checkout"))
513 "1ghk08akiz7hff1pndi8rmgamgcrn2mv9asbss9l79d3c2iaav3q"))))
514 (build-system gnu-build-system)
516 `(#:test-target "test"
518 (modify-phases %standard-phases
519 (add-before 'configure 'replace-rx
520 (lambda* (#:key inputs #:allow-other-keys)
521 (let* ((rx (assoc-ref inputs "scheme48-rx"))
522 (rxpath (string-append rx "/share/scheme48-"
523 ,(package-version scheme48)
525 (delete-file-recursively "rx")
526 (symlink rxpath "rx"))
529 `(("scheme48" ,scheme48)
530 ("scheme48-rx" ,scheme48-rx)))
532 `(("autoconf" ,autoconf)
533 ("automake" ,automake)))
534 (home-page "https://github.com/scheme/scsh")
535 (synopsis "Unix shell embedded in Scheme")
537 "Scsh is a Unix shell embedded in Scheme. Scsh has two main
538 components: a process notation for running programs and setting up pipelines
539 and redirections, and a complete syscall library for low-level access to the
543 (define-public linenoise
544 (let ((commit "2105ce445821381cf1bca87b6d386d4ea88ee20d")
548 (version (string-append "1.0-" revision "." (string-take commit 7)))
553 (url "https://github.com/antirez/linenoise")
555 (file-name (string-append name "-" version "-checkout"))
558 "1z16qwix8z6a40fskdgxsibkqgdrp4q6ncp4n6hnv4r9iihy2d8r"))))
559 (build-system gnu-build-system)
561 `(#:tests? #f ;No tests are included
562 #:make-flags (list "CC=gcc")
564 (modify-phases %standard-phases
567 (lambda* (#:key outputs #:allow-other-keys)
568 ;; At the moment there is no 'make install' in upstream.
569 (let* ((out (assoc-ref outputs "out")))
570 (install-file "linenoise.h"
571 (string-append out "/include/linenoise"))
572 (install-file "linenoise.c"
573 (string-append out "/include/linenoise"))
575 (home-page "https://github.com/antirez/linenoise")
576 (synopsis "Minimal zero-config readline replacement")
578 "Linenoise is a minimal, zero-config, readline replacement.
579 Its features include:
582 @item Single and multi line editing mode with the usual key bindings
583 @item History handling
585 @item Hints (suggestions at the right of the prompt as you type)
586 @item A subset of VT100 escapes, ANSI.SYS compatible
590 (define-public s-shell
591 (let ((commit "da2e5c20c0c5f477ec3426dc2584889a789b1659")
595 (version (git-version "0.0.0" revision commit))
600 (url "https://github.com/rain-1/s")
602 (file-name (string-append name "-" version "-checkout"))
605 "0qiny71ww5nhzy4mnc8652hn0mlxyb67h333gbdxp4j4qxsi13q4"))))
606 (build-system gnu-build-system)
608 `(("linenoise" ,linenoise)))
611 #:make-flags (list "CC=gcc"
612 (string-append "PREFIX="
613 (assoc-ref %outputs "out")))
615 (modify-phases %standard-phases
616 (add-after 'unpack 'install-directory-fix
617 (lambda* (#:key outputs #:allow-other-keys)
618 (let* ((out (assoc-ref outputs "out"))
619 (bin (string-append out "/bin")))
620 (substitute* "Makefile"
623 (add-after 'install 'manpage
624 (lambda* (#:key outputs #:allow-other-keys)
625 (install-file "s.1" (string-append (assoc-ref outputs "out")
626 "/share/man/man1"))))
628 (lambda* (#:key inputs outputs #:allow-other-keys)
629 ;; At this point linenoise is meant to be included,
630 ;; so we have to really copy it into the working directory
632 (let* ((linenoise (assoc-ref inputs "linenoise"))
633 (noisepath (string-append linenoise "/include/linenoise"))
634 (out (assoc-ref outputs "out")))
635 (copy-recursively noisepath "linenoise")
637 (("/bin/s") (string-append out "/bin/s")))
639 (home-page "https://github.com/rain-1/s")
640 (synopsis "Extremely minimal shell with the simplest syntax possible")
642 "S is a new shell that aims to be extremely simple.
643 S does not implemnt the POSIX shell standard.
644 There are no globs or \"splatting\" where a variable $FOO turns into multiple
645 command line arguments. One token stays one token forever.
646 This is a \"no surprises\" straightforward approach.
648 There are no redirection operators > in the shell language, they are added as
649 extra programs. > is just another unix command, < is essentially cat(1).
650 A @code{andglob} program is also provided along with s.")
660 (uri (string-append "https://connochaetos.org/oksh/oksh-"
664 "0ln9yf6pxngsviqszv8klnnvn8vcpplvj1njdn8xr2y8frkbw8r3"))))
665 (build-system gnu-build-system)
667 `(; The test files are not part of the distributed tarball.
669 (home-page "https://connochaetos.org/oksh")
670 (synopsis "Port of OpenBSD Korn Shell")
672 "Oksh is a port of the OpenBSD Korn Shell.
673 The OpenBSD Korn Shell is a cleaned up and enhanced ksh.")
684 (url "https://github.com/dimkr/loksh.git")
686 (file-name (git-file-name name version))
688 (base32 "1a8s64n97ikvvi7ckirxnnjvcmhr3dd4rnqm2ivapyzb0wp42jk7"))))
689 (build-system gnu-build-system)
692 ("ncurses" ,ncurses)))
694 `(("pkg-config" ,pkg-config)))
696 `(#:tests? #f ; no tests included
697 #:make-flags (list "CC=gcc" "HAVE_LIBBSD=1"
698 (string-append "PREFIX="
699 (assoc-ref %outputs "out")))
701 (modify-phases %standard-phases
702 (delete 'configure)))) ; no configure script
703 (home-page "https://github.com/dimkr/loksh")
704 (synopsis "Korn Shell from OpenBSD")
706 "loksh is a Linux port of OpenBSD's @command{ksh}. It is a small,
707 interactive POSIX shell targeted at resource-constrained systems.")
708 ;; The file 'LEGAL' says it is the public domain, and the 2
709 ;; exceptions which are listed are not included in this port.
710 (license public-domain)))
719 (uri (string-append "https://www.mirbsd.org/MirOS/dist/mir/mksh/mksh-R"
722 (base32 "0xdykm1z710wriwd6nc8s8lwk2dwjl63dq96xxaawlid31a1241x"))))
723 (build-system gnu-build-system)
725 `(#:tests? #f ; tests require access to /dev/tty
727 (modify-phases %standard-phases
732 (invoke (which "sh") "Build.sh")))
734 (lambda* (#:key outputs #:allow-other-keys)
735 (let* ((out (assoc-ref outputs "out"))
736 (bin (string-append out "/bin"))
737 (man (string-append out "/share/man/man1")))
738 (install-file "mksh" bin)
739 (with-directory-excursion bin
740 (symlink "mksh" "ksh"))
741 (install-file "mksh.1" man)
743 (home-page "https://www.mirbsd.org/mksh.htm")
744 (synopsis "Korn Shell from MirBSD")
745 (description "mksh is an actively developed free implementation of the
746 Korn Shell programming language and a successor to the Public Domain Korn
751 (define-public oil-shell
757 (uri (string-append "https://www.oilshell.org/download/oil-"
761 "1dw4mgnlmaxlfygasfihgvbj32d3m9w6k5j7azb9d9lp35f3l7hl"))))
762 (build-system gnu-build-system)
764 '(#:tests? #f ; the tests are not distributed in the tarballs
765 #:strip-binaries? #f ; the binaries cannot be stripped
767 (modify-phases %standard-phases
768 (add-after 'unpack 'patch-compiler-invocation
770 (substitute* "configure"
774 (lambda* (#:key outputs #:allow-other-keys)
775 (let ((out (assoc-ref outputs "out")))
777 ;; The configure script doesn't recognize CONFIG_SHELL.
778 (setenv "CONFIG_SHELL" (which "sh"))
779 (invoke "./configure" (string-append "--prefix=" out)
780 "--with-readline"))))
781 (add-before 'install 'make-destination
783 ;; The build scripts don't create the destination directory.
784 (mkdir-p (string-append (assoc-ref %outputs "out") "/bin")))))))
786 `(("readline" ,readline)))
787 (synopsis "Bash-compatible Unix shell")
788 (description "Oil is a Unix / POSIX shell, compatible with Bash. It
789 implements the Oil language, which is a new shell language to which Bash can be
790 automatically translated. The Oil language is a superset of Bash. It also
791 implements the OSH language, a statically-parseable language based on Bash as it
792 is commonly written.")
793 (home-page "https://www.oilshell.org/")
794 (license (list psfl ; The Oil sources include a patched Python 2 source tree
802 (origin (method url-fetch)
803 (uri (string-append "mirror://savannah/gash/gash-"
807 "13m0yz5h9nj3x40mr6wr5xcpq1lscndfwcicw3skrz801025hhgf"))
808 (modules '((guix build utils)))))
809 (build-system gnu-build-system)
811 `(("pkg-config" ,pkg-config)))
813 `(("guile" ,guile-2.2)))
815 '(#:make-flags '("XFAIL_TESTS=tests/redirects.org")))
816 (home-page "https://savannah.nongnu.org/projects/gash/")
817 (synopsis "POSIX-compatible shell written in Guile Scheme")
818 (description "Gash is a POSIX-compatible shell written in Guile
819 Scheme. It provides both the shell interface, as well as a Guile
820 library for parsing shell scripts. Gash is designed to bootstrap Bash
821 as part of the Guix bootstrap process.")