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 Mathieu Othacehe <m.othacehe@gmail.com>
16 ;;; This file is part of GNU Guix.
18 ;;; GNU Guix is free software; you can redistribute it and/or modify it
19 ;;; under the terms of the GNU General Public License as published by
20 ;;; the Free Software Foundation; either version 3 of the License, or (at
21 ;;; your option) any later version.
23 ;;; GNU Guix is distributed in the hope that it will be useful, but
24 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
25 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 ;;; GNU General Public License for more details.
28 ;;; You should have received a copy of the GNU General Public License
29 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
31 (define-module (gnu packages shells)
32 #:use-module (gnu packages)
33 #:use-module (gnu packages autotools)
34 #:use-module (gnu packages base)
35 #:use-module (gnu packages bash)
36 #:use-module (gnu packages bison)
37 #:use-module (gnu packages documentation)
38 #:use-module (gnu packages groff)
39 #:use-module (gnu packages guile)
40 #:use-module (gnu packages libbsd)
41 #:use-module (gnu packages libedit)
42 #:use-module (gnu packages ncurses)
43 #:use-module (gnu packages pcre)
44 #:use-module (gnu packages perl)
45 #:use-module (gnu packages pkg-config)
46 #:use-module (gnu packages python)
47 #:use-module (gnu packages python-xyz)
48 #:use-module (gnu packages readline)
49 #:use-module (gnu packages scheme)
50 #:use-module (guix build-system gnu)
51 #:use-module (guix build-system python)
52 #:use-module (guix build-system trivial)
53 #:use-module (guix download)
54 #:use-module (guix git-download)
55 #:use-module (guix licenses)
56 #:use-module (guix packages))
65 (uri (string-append "http://gondor.apana.org.au/~herbert/dash/files/"
66 "dash-" version ".tar.gz"))
69 "0wb0bwmqc661hylqcfdp7l7x12myw3vpqk513ncyqrjwvhckjriw"))
70 (modules '((guix build utils)))
73 ;; The man page hails from BSD, where (d)ash is the default shell.
74 ;; This isn't the case on Guix or indeed most other GNU systems.
75 (substitute* "src/dash.1"
76 (("the standard command interpreter for the system")
77 "a command interpreter based on the original Bourne shell"))
79 (build-system gnu-build-system)
81 `(("libedit" ,libedit)))
83 '(#:configure-flags '("--with-libedit")))
84 (home-page "http://gondor.apana.org.au/~herbert/dash")
85 (synopsis "POSIX-compliant shell optimised for size")
87 "dash is a POSIX-compliant @command{/bin/sh} implementation that aims to be
88 as small as possible, often without sacrificing speed. It is faster than the
89 GNU Bourne-Again Shell (@command{bash}) at most scripted tasks. dash is a
90 direct descendant of NetBSD's Almquist Shell (@command{ash}).")
92 gpl2+)))) ; mksignames.c
101 (uri (string-append "https://github.com/fish-shell/fish-shell/"
102 "releases/download/" version "/"
103 name "-" version ".tar.gz"))
105 (base32 "03j3jl9jzlnhq4p86zj8wqsh5sx45j1d1fvfa80ks1cfdg68qwhl"))))
106 (build-system gnu-build-system)
108 `(("fish-foreign-env" ,fish-foreign-env)
109 ("groff" ,groff) ; for 'fish --help'
111 ("pcre2" ,pcre2) ; don't use the bundled PCRE2
112 ("python" ,python))) ; for fish_config and manpage completions
114 `(("doxygen" ,doxygen)))
116 '(#:tests? #f ; no check target
118 (modify-phases %standard-phases
119 (add-after 'unpack 'patch-source
121 (substitute* '("build_tools/build_commands_hdr.sh"
122 "build_tools/build_user_doc.sh")
123 (("/usr/bin/env") "env"))
125 ;; Embed absolute paths.
126 (add-before 'install 'embed-absolute-paths
128 (substitute* '("share/functions/__fish_config_interactive.fish"
129 "share/functions/fish_config.fish"
130 "share/functions/fish_update_completions.fish")
131 (("python3") (which "python3")))
132 (substitute* "share/functions/__fish_print_help.fish"
133 (("nroff") (which "nroff")))
135 ;; Source /etc/fish/config.fish from $__fish_sysconf_dir/config.fish.
136 (add-before 'install 'patch-fish-config
138 (let ((port (open-file "etc/config.fish" "a")))
139 (display (string-append
141 "# Patched by Guix.\n"
142 "# Source /etc/fish/config.fish.\n"
143 "if test -f /etc/fish/config.fish\n"
144 " source /etc/fish/config.fish\n"
149 ;; Enable completions, functions and configurations in user's and
150 ;; system's guix profiles by adding them to __extra_* variables.
151 (add-before 'install 'patch-fish-extra-paths
153 (let ((port (open-file "share/__fish_build_paths.fish" "a")))
157 "# Patched by Guix.\n"
158 "# Enable completions, functions and configurations in user's"
159 " and system's guix profiles by adding them to __extra_*"
161 "set -l __guix_profile_paths ~/.guix-profile"
162 " /run/current-system/profile\n"
163 "set __extra_completionsdir"
164 " $__guix_profile_paths\"/etc/fish/completions\""
165 " $__guix_profile_paths\"/share/fish/vendor_completions.d\""
166 " $__extra_completionsdir\n"
167 "set __extra_functionsdir"
168 " $__guix_profile_paths\"/etc/fish/functions\""
169 " $__guix_profile_paths\"/share/fish/vendor_functions.d\""
170 " $__extra_functionsdir\n"
171 "set __extra_confdir"
172 " $__guix_profile_paths\"/etc/fish/conf.d\""
173 " $__guix_profile_paths\"/share/fish/vendor_conf.d\""
174 " $__extra_confdir\n")
178 ;; Use fish-foreign-env to source /etc/profile.
179 (add-before 'install 'source-etc-profile
180 (lambda* (#:key inputs #:allow-other-keys)
181 (let ((port (open-file "share/__fish_build_paths.fish" "a")))
185 "# Patched by Guix.\n"
186 "# Use fish-foreign-env to source /etc/profile.\n"
187 "if status is-login\n"
188 " set fish_function_path "
189 (assoc-ref inputs "fish-foreign-env") "/share/fish/functions"
190 " $__fish_datadir/functions\n"
191 " fenv source /etc/profile\n"
192 " set -e fish_function_path\n"
197 (synopsis "The friendly interactive shell")
199 "Fish (friendly interactive shell) is a shell focused on interactive use,
200 discoverability, and friendliness. Fish has very user-friendly and powerful
201 tab-completion, including descriptions of every completion, completion of
202 strings with wildcards, and many completions for specific commands. It also
203 has extensive and discoverable help. A special @command{help} command gives
204 access to all the fish documentation in your web browser. Other features
205 include smart terminal handling based on terminfo, an easy to search history,
206 and syntax highlighting.")
207 (home-page "https://fishshell.com/")
210 (define-public fish-foreign-env
212 (name "fish-foreign-env")
213 (version "0.20190116")
218 (url "https://github.com/oh-my-fish/plugin-foreign-env.git")
219 (commit "dddd9213272a0ab848d474d0cbde12ad034e65bc")))
220 (file-name (git-file-name name version))
222 (base32 "00xqlyl3lffc5l0viin1nyp819wf81fncqyz87jx8ljjdhilmgbs"))))
223 (build-system trivial-build-system)
225 '(#:modules ((guix build utils))
228 (use-modules (guix build utils))
229 (let* ((source (assoc-ref %build-inputs "source"))
230 (out (assoc-ref %outputs "out"))
231 (func-path (string-append out "/share/fish/functions")))
233 (copy-recursively (string-append source "/functions")
236 ;; Embed absolute paths.
237 (substitute* `(,(string-append func-path "/fenv.fish")
238 ,(string-append func-path "/fenv.apply.fish")
239 ,(string-append func-path "/fenv.main.fish"))
241 (string-append (assoc-ref %build-inputs "bash") "/bin/bash"))
243 (string-append (assoc-ref %build-inputs "sed") "/bin/sed"))
245 (string-append " " (assoc-ref %build-inputs "coreutils")
249 ("coreutils" ,coreutils)
251 (home-page "https://github.com/oh-my-fish/plugin-foreign-env")
252 (synopsis "Foreign environment interface for fish shell")
253 (description "@code{fish-foreign-env} wraps bash script execution in a way
254 that environment variables that are exported or modified get imported back
265 (url "https://github.com/rakitzis/rc.git")
266 (commit (string-append "v" version))))
269 "0vj1h4pcg13vxsiydmmk87dr2sra9h4gwx0c4q6fjsiw4in78rrd"))
270 (file-name (git-file-name name version))))
271 (build-system gnu-build-system)
276 (modify-phases %standard-phases
277 (add-before 'bootstrap 'patch-trip.rc
279 (substitute* "trip.rc"
280 (("/bin/pwd") (which "pwd"))
281 (("/bin/sh") (which "sh"))
282 (("/bin/rm") (which "rm"))
283 (("/bin\\)") (string-append (dirname (which "rm")) ")")))
285 (inputs `(("readline" ,readline)
287 (native-inputs `(("autoconf" ,autoconf)
288 ("automake" ,automake)
290 ("pkg-config" ,pkg-config)))
291 (synopsis "Alternative implementation of the rc shell by Byron Rakitzis")
293 "This is a reimplementation by Byron Rakitzis of the Plan 9 shell. It
294 has a small feature set similar to a traditional Bourne shell.")
295 (home-page "https://github.com/rakitzis/rc")
305 (uri (string-append "https://github.com/wryun/es-shell/releases/"
306 "download/v" version "/es-" version ".tar.gz"))
309 "1fplzxc6lncz2lv2fyr2ig23rgg5j96rm2bbl1rs28mik771zd5h"))
310 (file-name (string-append name "-" version ".tar.gz"))))
311 (build-system gnu-build-system)
313 `(#:test-target "test"
315 (modify-phases %standard-phases
316 (add-before 'configure 're-enter-rootdir
317 ;; The tarball has no folder.
321 `(("readline" ,readline)))
324 (synopsis "Extensible shell with higher-order functions")
326 "Es is an extensible shell. The language was derived from the Plan 9
327 shell, rc, and was influenced by functional programming languages, such as
328 Scheme, and the Tcl embeddable programming language. This implementation is
329 derived from Byron Rakitzis's public domain implementation of rc, and was
330 written by Paul Haahr and Byron Rakitzis.")
331 (home-page "https://wryun.github.io/es-shell/")
332 (license public-domain)))
340 ;; Old tarballs are moved to old/.
341 (uri (list (string-append "ftp://ftp.astron.com/pub/tcsh/"
342 "tcsh-" version ".tar.gz")
343 (string-append "ftp://ftp.astron.com/pub/tcsh/"
344 "old/tcsh-" version ".tar.gz")))
347 "0nw8prz1n0lmr82wnpyhrzmki630afn7p9cfgr3vl00vr9c72a7d"))
348 (patches (search-patches "tcsh-fix-autotest.patch"))
349 (patch-flags '("-p0"))))
350 (build-system gnu-build-system)
352 `(("autoconf" ,autoconf)
355 `(("ncurses" ,ncurses)))
358 (modify-phases %standard-phases
359 ,@(if (%current-target-system)
360 '((add-before 'configure 'set-cross-cc
362 (substitute* "configure"
363 (("CC_FOR_GETHOST=\"cc\"")
364 "CC_FOR_GETHOST=\"gcc\""))
367 (add-before 'check 'patch-test-scripts
370 (substitute* '("tests/commands.at" "tests/variables.at")
371 (("/bin/pwd") (which "pwd")))
372 ;; The .at files create shell scripts without shebangs. Erk.
373 (substitute* "tests/commands.at"
374 (("./output.sh") "/bin/sh output.sh"))
375 (substitute* "tests/syntax.at"
376 (("; other_script.csh") "; /bin/sh other_script.csh"))
377 ;; Now, let's generate the test suite and patch it
378 (invoke "make" "tests/testsuite")
380 ;; This file is ISO-8859-1 encoded.
381 (with-fluids ((%default-port-encoding #f))
382 (substitute* "tests/testsuite"
383 (("/bin/sh") (which "sh"))))
385 (add-after 'install 'post-install
386 (lambda* (#:key inputs outputs #:allow-other-keys)
387 (let* ((out (assoc-ref %outputs "out"))
388 (bin (string-append out "/bin")))
389 (with-directory-excursion bin
390 (symlink "tcsh" "csh"))
392 (home-page "http://www.tcsh.org/")
393 (synopsis "Unix shell based on csh")
395 "Tcsh is an enhanced, but completely compatible version of the Berkeley
396 UNIX C shell (csh). It is a command language interpreter usable both as an
397 interactive login shell and a shell script command processor. It includes a
398 command-line editor, programmable word completion, spelling correction, a
399 history mechanism, job control and a C-like syntax.")
408 (uri (list (string-append
409 "https://www.zsh.org/pub/zsh-" version
412 "https://www.zsh.org/pub/old/zsh-" version
416 "17iffliqcj4hv91g0bd2sxsyfcz51mfyh97sp2iyrs2p0mndc2x5"))))
417 (build-system gnu-build-system)
418 (arguments `(#:configure-flags '("--with-tcsetpgrp" "--enable-pcre")
420 (modify-phases %standard-phases
421 (add-before 'configure 'fix-sh
423 ;; Some of the files are ISO-8859-1 encoded.
424 (with-fluids ((%default-port-encoding #f))
430 "Config/installfns.sh"
432 "Test/E01options.ztst"
433 "Test/A05execution.ztst"
434 "Test/A01grammar.ztst"
435 "Test/A06assign.ztst"
436 "Test/B02typeset.ztst"
437 "Completion/Unix/Command/_init_d"
439 (("/bin/sh") (which "sh"))))))
440 (add-before 'check 'patch-test
442 ;; In Zsh, `command -p` searches a predefined set of
443 ;; paths that don't exist in the build environment. See
444 ;; the assignment of 'path' in Src/init.c'
445 (substitute* "Test/A01grammar.ztst"
446 (("command -pv") "command -v")
447 (("command -p") "command ")
448 (("'command' -p") "'command' "))
450 (native-inputs `(("autoconf" ,autoconf)))
451 (inputs `(("ncurses" ,ncurses)
454 (synopsis "Powerful shell for interactive use and scripting")
455 (description "The Z shell (zsh) is a Unix shell that can be used
456 as an interactive login shell and as a powerful command interpreter
457 for shell scripting. Zsh can be thought of as an extended Bourne shell
458 with a large number of improvements, including some features of bash,
460 (home-page "https://www.zsh.org/")
462 ;; The whole thing is under an MIT/X11-style license, but there's one
463 ;; command, 'Completion/Unix/Command/_darcs', which is under GPLv2+.
473 (uri (pypi-uri "xonsh" version))
476 "0c2bbmdg0n10q54vq9k1z5n53l0mh1hb1q5xprfhilvrbr6hlcwr"))
477 (modules '((guix build utils)))
480 ;; Delete bundled ply.
481 (delete-file-recursively "xonsh/ply")
482 (substitute* '("setup.py")
483 (("'xonsh\\.ply\\.ply',") ""))
485 (build-system python-build-system)
487 '(;; TODO Try running run the test suite.
488 ;; See 'requirements-tests.txt' in the source distribution for more
492 `(("python-ply" ,python-ply)))
493 (home-page "http://xon.sh/")
494 (synopsis "Python-ish shell")
496 "Xonsh is a Python-ish, BASHwards-looking shell language and command
497 prompt. The language is a superset of Python 3.4+ with additional shell
498 primitives that you are used to from Bash and IPython. It works on all major
499 systems including Linux, Mac OSX, and Windows. Xonsh is meant for the daily
500 use of experts and novices alike.")
504 (let ((commit "114432435e4eadd54334df6b37fcae505079b49f")
508 (version (string-append "0.0.0-" revision "." (string-take commit 7)))
513 (url "https://github.com/scheme/scsh")
515 (file-name (string-append name "-" version "-checkout"))
518 "1ghk08akiz7hff1pndi8rmgamgcrn2mv9asbss9l79d3c2iaav3q"))))
519 (build-system gnu-build-system)
521 `(#:test-target "test"
523 (modify-phases %standard-phases
524 (add-before 'configure 'replace-rx
525 (lambda* (#:key inputs #:allow-other-keys)
526 (let* ((rx (assoc-ref inputs "scheme48-rx"))
527 (rxpath (string-append rx "/share/scheme48-"
528 ,(package-version scheme48)
530 (delete-file-recursively "rx")
531 (symlink rxpath "rx"))
534 `(("scheme48" ,scheme48)
535 ("scheme48-rx" ,scheme48-rx)))
537 `(("autoconf" ,autoconf)
538 ("automake" ,automake)))
539 (home-page "https://github.com/scheme/scsh")
540 (synopsis "Unix shell embedded in Scheme")
542 "Scsh is a Unix shell embedded in Scheme. Scsh has two main
543 components: a process notation for running programs and setting up pipelines
544 and redirections, and a complete syscall library for low-level access to the
548 (define-public linenoise
549 (let ((commit "2105ce445821381cf1bca87b6d386d4ea88ee20d")
553 (version (string-append "1.0-" revision "." (string-take commit 7)))
558 (url "https://github.com/antirez/linenoise")
560 (file-name (string-append name "-" version "-checkout"))
563 "1z16qwix8z6a40fskdgxsibkqgdrp4q6ncp4n6hnv4r9iihy2d8r"))))
564 (build-system gnu-build-system)
566 `(#:tests? #f ;No tests are included
567 #:make-flags (list "CC=gcc")
569 (modify-phases %standard-phases
572 (lambda* (#:key outputs #:allow-other-keys)
573 ;; At the moment there is no 'make install' in upstream.
574 (let* ((out (assoc-ref outputs "out")))
575 (install-file "linenoise.h"
576 (string-append out "/include/linenoise"))
577 (install-file "linenoise.c"
578 (string-append out "/include/linenoise"))
580 (home-page "https://github.com/antirez/linenoise")
581 (synopsis "Minimal zero-config readline replacement")
583 "Linenoise is a minimal, zero-config, readline replacement.
584 Its features include:
587 @item Single and multi line editing mode with the usual key bindings
588 @item History handling
590 @item Hints (suggestions at the right of the prompt as you type)
591 @item A subset of VT100 escapes, ANSI.SYS compatible
595 (define-public s-shell
596 (let ((commit "da2e5c20c0c5f477ec3426dc2584889a789b1659")
600 (version (git-version "0.0.0" revision commit))
605 (url "https://github.com/rain-1/s")
607 (file-name (string-append name "-" version "-checkout"))
610 "0qiny71ww5nhzy4mnc8652hn0mlxyb67h333gbdxp4j4qxsi13q4"))))
611 (build-system gnu-build-system)
613 `(("linenoise" ,linenoise)))
616 #:make-flags (list "CC=gcc"
617 (string-append "PREFIX="
618 (assoc-ref %outputs "out")))
620 (modify-phases %standard-phases
621 (add-after 'unpack 'install-directory-fix
622 (lambda* (#:key outputs #:allow-other-keys)
623 (let* ((out (assoc-ref outputs "out"))
624 (bin (string-append out "/bin")))
625 (substitute* "Makefile"
628 (add-after 'install 'manpage
629 (lambda* (#:key outputs #:allow-other-keys)
630 (install-file "s.1" (string-append (assoc-ref outputs "out")
631 "/share/man/man1"))))
633 (lambda* (#:key inputs outputs #:allow-other-keys)
634 ;; At this point linenoise is meant to be included,
635 ;; so we have to really copy it into the working directory
637 (let* ((linenoise (assoc-ref inputs "linenoise"))
638 (noisepath (string-append linenoise "/include/linenoise"))
639 (out (assoc-ref outputs "out")))
640 (copy-recursively noisepath "linenoise")
642 (("/bin/s") (string-append out "/bin/s")))
644 (home-page "https://github.com/rain-1/s")
645 (synopsis "Extremely minimal shell with the simplest syntax possible")
647 "S is a new shell that aims to be extremely simple.
648 S does not implemnt the POSIX shell standard.
649 There are no globs or \"splatting\" where a variable $FOO turns into multiple
650 command line arguments. One token stays one token forever.
651 This is a \"no surprises\" straightforward approach.
653 There are no redirection operators > in the shell language, they are added as
654 extra programs. > is just another unix command, < is essentially cat(1).
655 A @code{andglob} program is also provided along with s.")
665 (uri (string-append "https://connochaetos.org/oksh/oksh-"
669 "0ln9yf6pxngsviqszv8klnnvn8vcpplvj1njdn8xr2y8frkbw8r3"))))
670 (build-system gnu-build-system)
672 `(; The test files are not part of the distributed tarball.
674 (home-page "https://connochaetos.org/oksh")
675 (synopsis "Port of OpenBSD Korn Shell")
677 "Oksh is a port of the OpenBSD Korn Shell.
678 The OpenBSD Korn Shell is a cleaned up and enhanced ksh.")
689 (url "https://github.com/dimkr/loksh.git")
691 (file-name (git-file-name name version))
693 (base32 "1a8s64n97ikvvi7ckirxnnjvcmhr3dd4rnqm2ivapyzb0wp42jk7"))))
694 (build-system gnu-build-system)
697 ("ncurses" ,ncurses)))
699 `(("pkg-config" ,pkg-config)))
701 `(#:tests? #f ; no tests included
702 #:make-flags (list "CC=gcc" "HAVE_LIBBSD=1"
703 (string-append "PREFIX="
704 (assoc-ref %outputs "out")))
706 (modify-phases %standard-phases
707 (delete 'configure)))) ; no configure script
708 (home-page "https://github.com/dimkr/loksh")
709 (synopsis "Korn Shell from OpenBSD")
711 "loksh is a Linux port of OpenBSD's @command{ksh}. It is a small,
712 interactive POSIX shell targeted at resource-constrained systems.")
713 ;; The file 'LEGAL' says it is the public domain, and the 2
714 ;; exceptions which are listed are not included in this port.
715 (license public-domain)))
724 (uri (string-append "https://www.mirbsd.org/MirOS/dist/mir/mksh/mksh-R"
727 (base32 "0xdykm1z710wriwd6nc8s8lwk2dwjl63dq96xxaawlid31a1241x"))))
728 (build-system gnu-build-system)
730 `(#:tests? #f ; tests require access to /dev/tty
732 (modify-phases %standard-phases
737 (invoke (which "sh") "Build.sh")))
739 (lambda* (#:key outputs #:allow-other-keys)
740 (let* ((out (assoc-ref outputs "out"))
741 (bin (string-append out "/bin"))
742 (man (string-append out "/share/man/man1")))
743 (install-file "mksh" bin)
744 (with-directory-excursion bin
745 (symlink "mksh" "ksh"))
746 (install-file "mksh.1" man)
748 (home-page "https://www.mirbsd.org/mksh.htm")
749 (synopsis "Korn Shell from MirBSD")
750 (description "mksh is an actively developed free implementation of the
751 Korn Shell programming language and a successor to the Public Domain Korn
756 (define-public oil-shell
762 (uri (string-append "https://www.oilshell.org/download/oil-"
766 "1dw4mgnlmaxlfygasfihgvbj32d3m9w6k5j7azb9d9lp35f3l7hl"))))
767 (build-system gnu-build-system)
769 '(#:tests? #f ; the tests are not distributed in the tarballs
770 #:strip-binaries? #f ; the binaries cannot be stripped
772 (modify-phases %standard-phases
773 (add-after 'unpack 'patch-compiler-invocation
775 (substitute* "configure"
779 (lambda* (#:key outputs #:allow-other-keys)
780 (let ((out (assoc-ref outputs "out")))
782 ;; The configure script doesn't recognize CONFIG_SHELL.
783 (setenv "CONFIG_SHELL" (which "sh"))
784 (invoke "./configure" (string-append "--prefix=" out)
785 "--with-readline"))))
786 (add-before 'install 'make-destination
788 ;; The build scripts don't create the destination directory.
789 (mkdir-p (string-append (assoc-ref %outputs "out") "/bin")))))))
791 `(("readline" ,readline)))
792 (synopsis "Bash-compatible Unix shell")
793 (description "Oil is a Unix / POSIX shell, compatible with Bash. It
794 implements the Oil language, which is a new shell language to which Bash can be
795 automatically translated. The Oil language is a superset of Bash. It also
796 implements the OSH language, a statically-parseable language based on Bash as it
797 is commonly written.")
798 (home-page "https://www.oilshell.org/")
799 (license (list psfl ; The Oil sources include a patched Python 2 source tree
807 (origin (method url-fetch)
808 (uri (string-append "mirror://savannah/gash/gash-"
812 "00m3lif64zyxd41cnk208kc81nl6qz659676qgiaqgwrw0brzrid"))
813 (modules '((guix build utils)))
816 (substitute* "Makefile.in"
817 (("^moddir = (.*)/guile/(.*)" _ before after)
818 (string-append "moddir = " before "/guile/site/"
820 (("^ccachedir = (.*)/ccache/(.*)" _ before after)
821 (string-append "ccachedir = " before
822 "/site-ccache/" after)))
824 (build-system gnu-build-system)
826 `(("pkg-config" ,pkg-config)))
828 `(("guile" ,guile-2.2)))
829 (home-page "https://savannah.nongnu.org/projects/gash/")
830 (synopsis "POSIX-compatible shell written in Guile Scheme")
831 (description "Gash is a POSIX-compatible shell written in Guile
832 Scheme. It provides both the shell interface, as well as a Guile
833 library for parsing shell scripts. Gash is designed to bootstrap Bash
834 as part of the Guix bootstrap process.")